2010-06-21 [iwkse] 3.7.6cvs10
authorSalvatore De Paolis <iwkse@claws-mail.org>
Mon, 21 Jun 2010 10:55:25 +0000 (10:55 +0000)
committerSalvatore De Paolis <iwkse@claws-mail.org>
Mon, 21 Jun 2010 10:55:25 +0000 (10:55 +0000)
* src/gtk/quicksearch.c
Do not add into quicksearch history
matching rules with bad syntax

ChangeLog
PATCHSETS
configure.ac
src/gtk/quicksearch.c

index 6b36ca4..3e0dd35 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-06-21 [iwkse]     3.7.6cvs10
+
+       * src/gtk/quicksearch.c
+                       Do not add into quicksearch history
+                       matching rules with bad syntax
+
 2010-05-26 [holger]    3.7.6cvs9
 
        * src/summaryview.c
index ccbdb4c..5a82644 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.53 -r 1.1.2.54 manual/advanced.xml;  cvs diff -u -r 1.382.2.551 -r 1.382.2.552 src/compose.c;  cvs diff -u -r 1.204.2.196 -r 1.204.2.197 src/prefs_common.c;  cvs diff -u -r 1.103.2.129 -r 1.103.2.130 src/prefs_common.h;  ) > 3.7.6cvs7.patchset
 ( cvs diff -u -r 1.2.2.20 -r 1.2.2.21 src/ldapctrl.c;  ) > 3.7.6cvs8.patchset
 ( cvs diff -u -r 1.395.2.419 -r 1.395.2.420 src/summaryview.c;  cvs diff -u -r 1.68.2.55 -r 1.68.2.56 src/summaryview.h;  ) > 3.7.6cvs9.patchset
+( cvs diff -u -r 1.1.2.92 -r 1.1.2.93 src/gtk/quicksearch.c;  ) > 3.7.6cvs10.patchset
index 6ef8b7c..bb9e6a4 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=9
+EXTRA_VERSION=10
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 9cee7a0..6443aa9 100644 (file)
@@ -217,23 +217,35 @@ static void searchbar_run(QuickSearch *quicksearch, gboolean run_only_if_fast)
 {
        gchar *search_string = quicksearch_get_text(quicksearch);
 
-       /* add to history */
+       prepare_matcher(quicksearch);
+
+       /* add to history, for extended search add only correct matching rules */
        if (!quicksearch->in_typing && search_string && strlen(search_string) != 0) {
-               if (prefs_common.summary_quicksearch_type == QUICK_SEARCH_EXTENDED)
-                       quicksearch->extended_search_strings =
-                               add_history(quicksearch->extended_search_strings,
-                                               search_string);
-               else
-                       quicksearch->normal_search_strings =
-                               add_history(quicksearch->normal_search_strings,
-                                               search_string);         
-               prefs_common.summary_quicksearch_history =
-                       add_history(prefs_common.summary_quicksearch_history,
-                                       search_string);
+               switch (prefs_common.summary_quicksearch_type) {
+                       case QUICK_SEARCH_EXTENDED:
+                               if (quicksearch->matcher_list) {
+                                       quicksearch->extended_search_strings =
+                                               add_history(quicksearch->extended_search_strings,
+                                                               search_string);
+                                       prefs_common.summary_quicksearch_history =
+                                               add_history(prefs_common.summary_quicksearch_history,
+                                                               search_string);
+                               }
+                               break;
+                       default:
+                               quicksearch->normal_search_strings =
+                                       add_history(quicksearch->normal_search_strings,
+                                                       search_string);         
+                               prefs_common.summary_quicksearch_history =
+                                       add_history(prefs_common.summary_quicksearch_history,
+                                                       search_string);
+                               break;
+               }
+
                quicksearch_set_popdown_strings(quicksearch);
+
        }
 
-       prepare_matcher(quicksearch);
        if (run_only_if_fast && !quicksearch->is_fast) {
                g_free(search_string);
                return;
@@ -1158,7 +1170,6 @@ static gchar *expand_search_string(const gchar *search_string)
           all available filtering expressions in quicksearch */
        if (matcherstr->len > 0) returnstr = matcherstr->str;
        else returnstr = g_strdup(search_string);
-
        g_string_free(matcherstr, FALSE);
        return returnstr;
 }