diff options
Diffstat (limited to 'modules/mail')
-rw-r--r-- | modules/mail/e-mail-shell-view-actions.c | 2 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-view-private.c | 8 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-view.c | 23 | ||||
-rw-r--r-- | modules/mail/em-account-prefs.c | 13 |
4 files changed, 20 insertions, 26 deletions
diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c index 2836b1bd09..aa48ed0788 100644 --- a/modules/mail/e-mail-shell-view-actions.c +++ b/modules/mail/e-mail-shell-view-actions.c @@ -109,7 +109,7 @@ action_mail_account_disable_cb (GtkAction *action, account->enabled = !account->enabled; e_account_list_change (account_list, account); - e_mail_store_remove_by_uri (session, folder_uri); + e_mail_store_remove_by_account (session, account); if (account->parent_uid != NULL) e_account_list_remove (account_list, account); diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c index 08ed7a97e7..ac13439eb6 100644 --- a/modules/mail/e-mail-shell-view-private.c +++ b/modules/mail/e-mail-shell-view-private.c @@ -1171,18 +1171,12 @@ e_mail_shell_view_send_receive (EMailShellView *mail_shell_view, } else { /* allow only receive on individual accounts */ EAccount *account; - const gchar *source_url = NULL; account = e_get_account_by_uid (account_uid); g_return_if_fail (account != NULL); if (account->enabled && account->source != NULL) - source_url = account->source->url; - - if (source_url != NULL && *source_url != '\0') - mail_receive_uri ( - session, source_url, - account->source->keep_on_server); + mail_receive_account (session, account); } } 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); diff --git a/modules/mail/em-account-prefs.c b/modules/mail/em-account-prefs.c index 79d64eaf3e..356351a2f1 100644 --- a/modules/mail/em-account-prefs.c +++ b/modules/mail/em-account-prefs.c @@ -67,8 +67,7 @@ account_prefs_enable_account_cb (EAccountTreeView *tree_view, account = e_account_tree_view_get_selected (tree_view); g_return_if_fail (account != NULL); - e_mail_store_add_by_uri ( - prefs->priv->session, account->source->url, account->name); + e_mail_store_add_by_account (prefs->priv->session, account); } static void @@ -87,7 +86,7 @@ account_prefs_disable_account_cb (EAccountTreeView *tree_view, g_return_if_fail (account_list != NULL); if (!e_account_list_account_has_proxies (account_list, account)) { - e_mail_store_remove_by_uri (prefs->priv->session, account->source->url); + e_mail_store_remove_by_account (prefs->priv->session, account); return; } @@ -104,8 +103,7 @@ account_prefs_disable_account_cb (EAccountTreeView *tree_view, e_account_list_remove_account_proxies (account_list, account); - e_mail_store_remove_by_uri ( - prefs->priv->session, account->source->url); + e_mail_store_remove_by_account (prefs->priv->session, account); } static void @@ -310,9 +308,8 @@ account_prefs_delete_account (EAccountManager *manager) } /* Remove the account from the folder tree. */ - if (account->enabled && account->source && account->source->url) - e_mail_store_remove_by_uri ( - priv->session, account->source->url); + if (account->enabled) + e_mail_store_remove_by_account (priv->session, account); /* Remove all the proxies the account has created. */ if (has_proxies) |