diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2001-01-24 07:51:04 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2001-01-24 07:51:04 +0800 |
commit | 0f301f38bc499beb749049c879715af7037c8fea (patch) | |
tree | bdd3403bf0783da5994c43954329b5418f5869af | |
parent | 9d3fd8c92531b33d5974b790c092c06f914a6282 (diff) | |
download | gsoc2013-evolution-0f301f38bc499beb749049c879715af7037c8fea.tar gsoc2013-evolution-0f301f38bc499beb749049c879715af7037c8fea.tar.gz gsoc2013-evolution-0f301f38bc499beb749049c879715af7037c8fea.tar.bz2 gsoc2013-evolution-0f301f38bc499beb749049c879715af7037c8fea.tar.lz gsoc2013-evolution-0f301f38bc499beb749049c879715af7037c8fea.tar.xz gsoc2013-evolution-0f301f38bc499beb749049c879715af7037c8fea.tar.zst gsoc2013-evolution-0f301f38bc499beb749049c879715af7037c8fea.zip |
Patch from Tuomas to have a "Sender contains" rule in the quicksearch
bar.
svn path=/trunk/; revision=7764
-rw-r--r-- | mail/ChangeLog | 14 | ||||
-rw-r--r-- | mail/folder-browser.c | 11 |
2 files changed, 25 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 874e179d4c..6fee495c34 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,17 @@ +2001-01-23 Ettore Perazzoli <ettore@ximian.com> + + [Applied patch from Tuomas Kuosmanen <tigert@ximian.com>] + + * folder-browser.c: Added enum value `ESB_SENDER_CONTAINS' as well + as a "Sender contains" item to the search menu. Also add a + corresponding "(match-all)" rule to the `search_string' array. + (search_save): Handle `ESB_SENDER_CONTAINS' here. + +2001-01-23 Ettore Perazzoli <ettore@ximian.com> + + * GNOME_Evolution_Mail.oafinfo: Fixed the repo_ids so that they + use the right syntax. + 2001-01-23 Dan Winship <danw@ximian.com> * folder-browser-factory.c: diff --git a/mail/folder-browser.c b/mail/folder-browser.c index 241c8a5d9e..700eda72f5 100644 --- a/mail/folder-browser.c +++ b/mail/folder-browser.c @@ -227,6 +227,7 @@ static ESearchBarItem folder_browser_search_menu_items[] = { }; enum { + ESB_SENDER_CONTAINS, ESB_BODY_SUBJECT_CONTAINS, ESB_BODY_CONTAINS, ESB_SUBJECT_CONTAINS, @@ -235,6 +236,7 @@ enum { }; static ESearchBarItem folder_browser_search_option_items[] = { + { N_("Sender contains"), ESB_SENDER_CONTAINS }, { N_("Body or subject contains"), ESB_BODY_SUBJECT_CONTAINS }, { N_("Body contains"), ESB_BODY_CONTAINS }, { N_("Subject contains"), ESB_SUBJECT_CONTAINS }, @@ -247,6 +249,7 @@ static ESearchBarItem folder_browser_search_option_items[] = { /* %s is replaced by the whole search string in quotes ... possibly could split the search string into words as well ? */ static char *search_string[] = { + "(match-all (header-contains \"from\" %s)", "(or (body-contains %s) (match-all (header-contains \"Subject\" %s)))", "(body-contains %s)", "(match-all (header-contains \"Subject\" %s)", @@ -327,6 +330,14 @@ search_save (GtkWidget *w, FolderBrowser *fb) default: /* header or body contains */ index = ESB_BODY_SUBJECT_CONTAINS; + case ESB_SENDER_CONTAINS: + part = vfolder_create_part ("from"); + filter_rule_add_part ((FilterRule *)rule, part); + element = filter_part_find_element (part, "from-type"); + filter_option_set_current ((FilterOption *)element, "contains"); + element = filter_part_find_element (part, "from"); + filter_input_set_value ((FilterInput *)element, text); + break; case ESB_BODY_CONTAINS: case ESB_SUBJECT_CONTAINS: if (index == ESB_BODY_SUBJECT_CONTAINS || index == ESB_BODY_CONTAINS) { |