aboutsummaryrefslogtreecommitdiffstats
path: root/mail/folder-browser.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2002-05-21 10:54:05 +0800
committerMichael Zucci <zucchi@src.gnome.org>2002-05-21 10:54:05 +0800
commite32a24e30ba3558de1ccf54b2f2aa0c348f07b65 (patch)
treefbd985d74c9d20593d09e8be7cbf1e53ab87d985 /mail/folder-browser.c
parent8435ad3d2db7d4cb0cbed199cd58ef0a5e0ae366 (diff)
downloadgsoc2013-evolution-e32a24e30ba3558de1ccf54b2f2aa0c348f07b65.tar.gz
gsoc2013-evolution-e32a24e30ba3558de1ccf54b2f2aa0c348f07b65.tar.zst
gsoc2013-evolution-e32a24e30ba3558de1ccf54b2f2aa0c348f07b65.zip
New functions to add additional search strings one at a time. Maybe it
2002-05-18 Not Zed <NotZed@Ximian.com> * e-searching-tokenizer.c (e_searching_tokenizer_add_primary_search_string): (e_searching_tokenizer_add_secondary_search_string): New functions to add additional search strings one at a time. Maybe it should just split the word itself? (all): Basically, entirely rewritten. Now implements the Aho-Corasick multiple pattern search algorithm and handles multiple search strings and only ever has to decode any utf8 character once, etc etc. svn path=/trunk/; revision=16961
Diffstat (limited to 'mail/folder-browser.c')
-rw-r--r--mail/folder-browser.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index c79f74ec70..6b19bf5b6b 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -72,6 +72,9 @@
#include <camel/camel-mime-message.h>
#include <camel/camel-stream-mem.h>
+/* maybe this shooudlnt be private ... */
+#include "camel/camel-search-private.h"
+
#define d(x)
#define PARENT_TYPE (gtk_table_get_type ())
@@ -1116,6 +1119,8 @@ folder_browser_config_search (EFilterBar *efb, FilterRule *rule, int id, const c
FolderBrowser *fb = FOLDER_BROWSER (data);
ESearchingTokenizer *st;
GList *partl;
+ struct _camel_search_words *words;
+ int i;
st = E_SEARCHING_TOKENIZER (fb->mail_display->html->engine->ht);
@@ -1134,7 +1139,12 @@ folder_browser_config_search (EFilterBar *efb, FilterRule *rule, int id, const c
FilterInput *input = (FilterInput *)filter_part_find_element(part, "word");
if (input)
filter_input_set_value(input, query);
- e_searching_tokenizer_set_secondary_search_string (st, query);
+
+ words = camel_search_words_split(query);
+ for (i=0;i<words->len;i++)
+ e_searching_tokenizer_add_secondary_search_string (st, words->words[i]->word);
+ camel_search_words_free(words);
+
} else if(!strcmp(part->name, "sender")) {
FilterInput *input = (FilterInput *)filter_part_find_element(part, "sender");
if (input)