aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail/em-account-prefs.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-10-27 00:31:33 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-10-27 00:46:13 +0800
commit2b7bb054f06797c93e0b82dd78e1a2c0b6ad9659 (patch)
treeb2083067a76519ddc6da1f6423d86cbe398cb9fd /modules/mail/em-account-prefs.c
parent251b734a8573a1d6b04d2b82ce1f0be9fe9662ab (diff)
downloadgsoc2013-evolution-2b7bb054f06797c93e0b82dd78e1a2c0b6ad9659.tar
gsoc2013-evolution-2b7bb054f06797c93e0b82dd78e1a2c0b6ad9659.tar.gz
gsoc2013-evolution-2b7bb054f06797c93e0b82dd78e1a2c0b6ad9659.tar.bz2
gsoc2013-evolution-2b7bb054f06797c93e0b82dd78e1a2c0b6ad9659.tar.lz
gsoc2013-evolution-2b7bb054f06797c93e0b82dd78e1a2c0b6ad9659.tar.xz
gsoc2013-evolution-2b7bb054f06797c93e0b82dd78e1a2c0b6ad9659.tar.zst
gsoc2013-evolution-2b7bb054f06797c93e0b82dd78e1a2c0b6ad9659.zip
e-mail-store.c: Take EMailSession instead of EMailBackend.
My apologies for flip-flopping the API again. e-mail-store.c functions used to take an EMailSession, then I changed it to take an EMailBackend in preparation for my account-mgmt branch. Having rethought some API decisions on the branch, however, the first flip-flop proved to be unnecessary. And now Srini needs the API to use EMailSession for his mail-factory branch, so I'm flip-flopping again.
Diffstat (limited to 'modules/mail/em-account-prefs.c')
-rw-r--r--modules/mail/em-account-prefs.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/modules/mail/em-account-prefs.c b/modules/mail/em-account-prefs.c
index 0dc93bea1f..ddf51d815e 100644
--- a/modules/mail/em-account-prefs.c
+++ b/modules/mail/em-account-prefs.c
@@ -98,6 +98,7 @@ account_prefs_enable_account_cb (EAccountTreeView *tree_view,
EMAccountPrefs *prefs)
{
EAccount *account;
+ EMailSession *session;
account = e_account_tree_view_get_selected (tree_view);
if (!account) {
@@ -107,7 +108,8 @@ account_prefs_enable_account_cb (EAccountTreeView *tree_view,
g_return_if_fail (account != NULL);
- e_mail_store_add_by_account (prefs->priv->backend, account);
+ session = e_mail_backend_get_session (prefs->priv->backend);
+ e_mail_store_add_by_account (session, account);
}
static void
@@ -116,6 +118,7 @@ account_prefs_disable_account_cb (EAccountTreeView *tree_view,
{
EAccountList *account_list;
EAccount *account;
+ EMailSession *session;
gpointer parent;
gint response;
@@ -127,11 +130,13 @@ account_prefs_disable_account_cb (EAccountTreeView *tree_view,
g_return_if_fail (account != NULL);
+ session = e_mail_backend_get_session (prefs->priv->backend);
+
account_list = e_account_tree_view_get_account_list (tree_view);
g_return_if_fail (account_list != NULL);
if (!e_account_list_account_has_proxies (account_list, account)) {
- e_mail_store_remove_by_account (prefs->priv->backend, account);
+ e_mail_store_remove_by_account (session, account);
return;
}
@@ -148,7 +153,7 @@ account_prefs_disable_account_cb (EAccountTreeView *tree_view,
e_account_list_remove_account_proxies (account_list, account);
- e_mail_store_remove_by_account (prefs->priv->backend, account);
+ e_mail_store_remove_by_account (session, account);
}
static void
@@ -321,11 +326,13 @@ account_prefs_delete_account (EAccountManager *manager)
EAccountTreeView *tree_view;
EAccountList *account_list;
EAccount *account;
+ EMailSession *session;
gboolean has_proxies;
gpointer parent;
gint response;
priv = EM_ACCOUNT_PREFS (manager)->priv;
+ session = e_mail_backend_get_session (priv->backend);
account_list = e_account_manager_get_account_list (manager);
tree_view = e_account_manager_get_tree_view (manager);
@@ -354,7 +361,7 @@ account_prefs_delete_account (EAccountManager *manager)
/* Remove the account from the folder tree. */
if (account->enabled)
- e_mail_store_remove_by_account (priv->backend, account);
+ e_mail_store_remove_by_account (session, account);
/* Remove all the proxies the account has created. */
if (has_proxies)