aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@novell.com>2008-02-22 18:31:15 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2008-02-22 18:31:15 +0800
commitbdb224def86d58bde4218fa8ed21d689242923f9 (patch)
tree2c5e47c5ff27760a094187612abcc715ef123bb4 /mail
parent4d830775a9ab6bea2de59a61bd08de8841f14495 (diff)
downloadgsoc2013-evolution-bdb224def86d58bde4218fa8ed21d689242923f9.tar
gsoc2013-evolution-bdb224def86d58bde4218fa8ed21d689242923f9.tar.gz
gsoc2013-evolution-bdb224def86d58bde4218fa8ed21d689242923f9.tar.bz2
gsoc2013-evolution-bdb224def86d58bde4218fa8ed21d689242923f9.tar.lz
gsoc2013-evolution-bdb224def86d58bde4218fa8ed21d689242923f9.tar.xz
gsoc2013-evolution-bdb224def86d58bde4218fa8ed21d689242923f9.tar.zst
gsoc2013-evolution-bdb224def86d58bde4218fa8ed21d689242923f9.zip
** Fix for BNC #358697
2008-02-22 Srinivasa Ragavan <sragavan@novell.com> ** Fix for BNC #358697 * em-folder-browser.c: (emfb_set_folder): Make sure the default search filter for sent/draft/outbox is "Recipients Contain" svn path=/trunk/; revision=35070
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/em-folder-browser.c28
2 files changed, 33 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 4a5495043a..1ce93c3513 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+2008-02-22 Srinivasa Ragavan <sragavan@novell.com>
+
+ ** Fix for BNC #358697
+
+ * em-folder-browser.c: (emfb_set_folder): Make sure the default search
+ filter for sent/draft/outbox is "Recipients Contain"
+
2008-02-20 Srinivasa Ragavan <sragavan@novell.com>
** Fix for bug #469292
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
index 87eb5d5256..1d58859a4e 100644
--- a/mail/em-folder-browser.c
+++ b/mail/em-folder-browser.c
@@ -2029,8 +2029,32 @@ emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
/* Fixme */
sstate = camel_object_meta_get(folder, "evolution:search_state");
- g_object_set(emfb->search, "state", sstate, NULL);
- g_free(sstate);
+ if (sstate) {
+ g_object_set(emfb->search, "state", sstate, NULL);
+ g_free(sstate);
+ } else {
+ gboolean outgoing;
+ outgoing = em_utils_folder_is_drafts (emfv->folder, emfv->folder_uri)
+ || em_utils_folder_is_sent (emfv->folder, emfv->folder_uri)
+ || em_utils_folder_is_outbox (emfv->folder, emfv->folder_uri);
+
+ e_search_bar_set_text ((ESearchBar *)emfb->search, "");
+
+ if (outgoing) {
+ e_search_bar_set_item_id ((ESearchBar *)emfb->search, 1);
+ ((ESearchBar *)emfb->search)->block_search = TRUE;
+ e_search_bar_set_item_menu ((ESearchBar *)emfb->search, 1);
+ ((ESearchBar *)emfb->search)->block_search = FALSE;
+
+ } else {
+ e_search_bar_set_item_id ((ESearchBar *)emfb->search, 0);
+ ((ESearchBar *)emfb->search)->block_search = TRUE;
+ e_search_bar_set_item_menu ((ESearchBar *)emfb->search, 0);
+ ((ESearchBar *)emfb->search)->block_search = FALSE;
+
+ }
+ e_search_bar_paint ((ESearchBar *)emfb->search);
+ }
/* set the query manually, so we dont pop up advanced or saved search stuff */