diff options
Diffstat (limited to 'modules/mail/e-mail-shell-view.c')
-rw-r--r-- | modules/mail/e-mail-shell-view.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c index 1db444e936..ebbbcef65f 100644 --- a/modules/mail/e-mail-shell-view.c +++ b/modules/mail/e-mail-shell-view.c @@ -605,15 +605,16 @@ all_accounts: /* Create a new search folder. */ /* FIXME Complete lack of error checking here. */ - service = camel_session_get_service ( + service = camel_session_ref_service ( CAMEL_SESSION (session), E_MAIL_SESSION_VFOLDER_UID); camel_service_connect_sync (service, NULL, NULL); search_folder = (CamelVeeFolder *) camel_vee_folder_new ( - CAMEL_STORE (service), _("All Account Search"), - 0); + CAMEL_STORE (service), _("All Account Search"), 0); priv->search_account_all = search_folder; + g_object_unref (service); + camel_vee_folder_set_expression (search_folder, query); all_accounts_setup: @@ -701,15 +702,16 @@ current_account: /* Create a new search folder. */ /* FIXME Complete lack of error checking here. */ - service = camel_session_get_service ( + service = camel_session_ref_service ( CAMEL_SESSION (session), E_MAIL_SESSION_VFOLDER_UID); camel_service_connect_sync (service, NULL, NULL); search_folder = (CamelVeeFolder *) camel_vee_folder_new ( - CAMEL_STORE (service), _("Account Search"), - 0); + CAMEL_STORE (service), _("Account Search"), 0); priv->search_account_current = search_folder; + g_object_unref (service); + camel_vee_folder_set_expression (search_folder, query); current_accout_setup: |