aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail/e-mail-shell-view.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-04-21 07:06:35 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-04-21 19:45:45 +0800
commit397aeade0545457dae034b0287049aa1cbeed782 (patch)
tree00e5f01aaea81e8add946ef0f18130841b07256f /modules/mail/e-mail-shell-view.c
parent69add830e12856ab29b96bdce7335bf18e0a2a6f (diff)
downloadgsoc2013-evolution-397aeade0545457dae034b0287049aa1cbeed782.tar.gz
gsoc2013-evolution-397aeade0545457dae034b0287049aa1cbeed782.tar.zst
gsoc2013-evolution-397aeade0545457dae034b0287049aa1cbeed782.zip
Adapt to CamelService changes.
Diffstat (limited to 'modules/mail/e-mail-shell-view.c')
-rw-r--r--modules/mail/e-mail-shell-view.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c
index 2a3e2550ae..7655fba835 100644
--- a/modules/mail/e-mail-shell-view.c
+++ b/modules/mail/e-mail-shell-view.c
@@ -224,6 +224,7 @@ mail_shell_view_execute_search (EShellView *shell_view)
EMailView *mail_view;
CamelVeeFolder *search_folder;
CamelFolder *folder;
+ CamelService *service;
CamelStore *store;
GtkAction *action;
GtkTreeModel *model;
@@ -554,13 +555,14 @@ all_accounts:
list = NULL; /* list of CamelFolders */
- /* FIXME Using data_dir like this is not portable. */
- uri = g_strdup_printf ("vfolder:%s/vfolder", data_dir);
- store = camel_session_get_store (CAMEL_SESSION (session), uri, NULL);
- g_free (uri);
+ /* FIXME Complete lack of error checking here. */
+ service = camel_session_get_service (
+ CAMEL_SESSION (session), "vfolder");
+ camel_service_connect_sync (service, NULL);
search_folder = (CamelVeeFolder *) camel_vee_folder_new (
- store, _("All Account Search"), CAMEL_STORE_VEE_FOLDER_AUTO);
+ CAMEL_STORE (service), _("All Account Search"),
+ CAMEL_STORE_VEE_FOLDER_AUTO);
priv->search_account_all = search_folder;
/* Add local folders. */
@@ -737,13 +739,14 @@ current_account:
list = g_list_reverse (list);
- /* FIXME Using data_dir like this is not portable. */
- uri = g_strdup_printf ("vfolder:%s/vfolder", data_dir);
- store = camel_session_get_store (CAMEL_SESSION (session), uri, NULL);
- g_free (uri);
+ /* FIXME Complete lack of error checking here. */
+ service = camel_session_get_service (
+ CAMEL_SESSION (session), "vfolder");
+ camel_service_connect_sync (service, NULL);
search_folder = (CamelVeeFolder *) camel_vee_folder_new (
- store, _("Account Search"), CAMEL_STORE_VEE_FOLDER_AUTO);
+ CAMEL_STORE (service), _("Account Search"),
+ CAMEL_STORE_VEE_FOLDER_AUTO);
priv->search_account_current = search_folder;
camel_vee_folder_set_expression (search_folder, query);