commit 2f7b238b758e7122a4371e5ba9b30fe18645ab19
parent b61b46f5877d84df8e9e9800912f29a0acac64ef
Author: Salvatore De Paolis <iwkse@claws-mail.org>
Date: Mon, 21 Jun 2010 10:55:25 +0000
2010-06-21 [iwkse] 3.7.6cvs10
* src/gtk/quicksearch.c
Do not add into quicksearch history
matching rules with bad syntax
Diffstat:
4 files changed, 33 insertions(+), 15 deletions(-)
diff --git 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
diff --git a/PATCHSETS b/PATCHSETS
@@ -4005,3 +4005,4 @@
( 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
diff --git a/configure.ac b/configure.ac
@@ -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=
diff --git a/src/gtk/quicksearch.c b/src/gtk/quicksearch.c
@@ -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;
}