diff options
-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) { |