diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-01-31 02:15:52 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-01-31 02:15:52 +0800 |
commit | f411e3545c38bdb739c42ffac028c377102c23b6 (patch) | |
tree | a1d905e2143a28d39ccaacbfed631d06ed07b719 | |
parent | fd7589b17409fc1f4304e4ecfc676d270f925d8e (diff) | |
download | gsoc2013-evolution-f411e3545c38bdb739c42ffac028c377102c23b6.tar.gz gsoc2013-evolution-f411e3545c38bdb739c42ffac028c377102c23b6.tar.zst gsoc2013-evolution-f411e3545c38bdb739c42ffac028c377102c23b6.zip |
Fix for bug #53195.
2004-01-30 Jeffrey Stedfast <fejj@ximian.com>
Fix for bug #53195.
* em-folder-browser.c (emfb_set_folder): Restore search_state.
(emfb_search_search_activated): Save search_state.
svn path=/trunk/; revision=24543
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/em-folder-browser.c | 25 |
2 files changed, 25 insertions, 7 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 16e235bfd1..189d06e43a 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2004-01-30 Jeffrey Stedfast <fejj@ximian.com> + + Fix for bug #53195. + + * em-folder-browser.c (emfb_set_folder): Restore search_state. + (emfb_search_search_activated): Save search_state. + 2004-01-30 Not Zed <NotZed@Ximian.com> ** See bug #53549, partial fix. diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c index b30633481d..23ac1dd6d0 100644 --- a/mail/em-folder-browser.c +++ b/mail/em-folder-browser.c @@ -361,7 +361,7 @@ emfb_search_config_search(EFilterBar *efb, FilterRule *rule, int id, const char struct _camel_search_words *words; int i; GSList *strings = NULL; - + /* we scan the parts of a rule, and set all the types we know about to the query string */ partl = rule->parts; while (partl) { @@ -408,14 +408,20 @@ emfb_search_config_search(EFilterBar *efb, FilterRule *rule, int id, const char static void emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb) { - char *search_word; + EMFolderView *emfv = (EMFolderView *) emfb; + char *search_word, *search_state; - if (emfb->view.list == NULL) + if (emfv->list == NULL) return; g_object_get (esb, "query", &search_word, NULL); message_list_set_search(emfb->view.list, search_word); - g_free(search_word); + g_free (search_word); + + g_object_get (esb, "state", &search_state, NULL); + camel_object_meta_set (emfv->folder, "evolution:search_state", search_state); + camel_object_state_write (emfv->folder); + g_free (search_state); } static void @@ -901,7 +907,7 @@ emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri) char *sstate; if ((sstate = camel_object_meta_get (folder, "evolution:show_preview"))) { - em_folder_browser_show_preview ((EMFolderBrowser *) emfv, sstate[0] != '0'); + em_folder_browser_show_preview (emfb, sstate[0] != '0'); g_free (sstate); } @@ -910,6 +916,11 @@ emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri) g_free (sstate); } + if ((sstate = camel_object_meta_get (folder, "evolution:search_state"))) { + g_object_set (emfb->search, "state", sstate, NULL); + g_free (sstate); + } + if ((sstate = camel_object_meta_get (folder, "evolution:selected_uid"))) emfb->priv->select_uid = sstate; @@ -917,9 +928,9 @@ emfb_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri) emfb->priv->list_built_id = g_signal_connect (emfv->list, "message_list_built", G_CALLBACK (emfb_list_built), emfv); - /*emfb_create_view_instance ((EMFolderBrowser *) emfv, folder, uri);*/ + /*emfb_create_view_instance (emfb, folder, uri);*/ if (emfv->uic) - emfb_create_view_menus((EMFolderBrowser *)emfv, emfv->uic); + emfb_create_view_menus (emfb, emfv->uic); } } |