diff options
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/em-folder-browser.c | 28 |
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 */ |