aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail/em-account-prefs.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-09-27 13:13:42 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-09-27 21:31:13 +0800
commite2b6ff7a6c1e1580c26ee0719b349151e8dad6fd (patch)
treed2d2ce8eb509717d412ad3171059e470ff0e7030 /modules/mail/em-account-prefs.c
parentc520043a094d81d222aa0c3e23b0035ddb89d0bf (diff)
downloadgsoc2013-evolution-e2b6ff7a6c1e1580c26ee0719b349151e8dad6fd.tar
gsoc2013-evolution-e2b6ff7a6c1e1580c26ee0719b349151e8dad6fd.tar.gz
gsoc2013-evolution-e2b6ff7a6c1e1580c26ee0719b349151e8dad6fd.tar.bz2
gsoc2013-evolution-e2b6ff7a6c1e1580c26ee0719b349151e8dad6fd.tar.lz
gsoc2013-evolution-e2b6ff7a6c1e1580c26ee0719b349151e8dad6fd.tar.xz
gsoc2013-evolution-e2b6ff7a6c1e1580c26ee0719b349151e8dad6fd.tar.zst
gsoc2013-evolution-e2b6ff7a6c1e1580c26ee0719b349151e8dad6fd.zip
Miscellaneous cleanups from the account-mgmt branch.
Reducing diff noise so I can see important changes easier when comparing branches. A few API changes, but nothing that affects functionality.
Diffstat (limited to 'modules/mail/em-account-prefs.c')
-rw-r--r--modules/mail/em-account-prefs.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/modules/mail/em-account-prefs.c b/modules/mail/em-account-prefs.c
index 1b11b41b68..0dc93bea1f 100644
--- a/modules/mail/em-account-prefs.c
+++ b/modules/mail/em-account-prefs.c
@@ -62,7 +62,9 @@ G_DEFINE_TYPE (
E_TYPE_ACCOUNT_MANAGER)
static gboolean
-account_prefs_toggle_enable_special (EMAccountPrefs *prefs, EAccountTreeViewSelectedType type, gboolean enabled)
+account_prefs_toggle_enable_special (EMAccountPrefs *prefs,
+ EAccountTreeViewSelectedType type,
+ gboolean enabled)
{
const gchar *prop = NULL;
EShell *shell;
@@ -96,7 +98,6 @@ 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) {
@@ -106,8 +107,7 @@ account_prefs_enable_account_cb (EAccountTreeView *tree_view,
g_return_if_fail (account != NULL);
- session = e_mail_backend_get_session (prefs->priv->backend);
- e_mail_store_add_by_account (session, account);
+ e_mail_store_add_by_account (prefs->priv->backend, account);
}
static void
@@ -115,7 +115,6 @@ account_prefs_disable_account_cb (EAccountTreeView *tree_view,
EMAccountPrefs *prefs)
{
EAccountList *account_list;
- EMailSession *session;
EAccount *account;
gpointer parent;
gint response;
@@ -131,10 +130,8 @@ account_prefs_disable_account_cb (EAccountTreeView *tree_view,
account_list = e_account_tree_view_get_account_list (tree_view);
g_return_if_fail (account_list != NULL);
- session = e_mail_backend_get_session (prefs->priv->backend);
-
if (!e_account_list_account_has_proxies (account_list, account)) {
- e_mail_store_remove_by_account (session, account);
+ e_mail_store_remove_by_account (prefs->priv->backend, account);
return;
}
@@ -151,7 +148,7 @@ account_prefs_disable_account_cb (EAccountTreeView *tree_view,
e_account_list_remove_account_proxies (account_list, account);
- e_mail_store_remove_by_account (session, account);
+ e_mail_store_remove_by_account (prefs->priv->backend, account);
}
static void
@@ -323,14 +320,12 @@ account_prefs_delete_account (EAccountManager *manager)
EMAccountPrefsPrivate *priv;
EAccountTreeView *tree_view;
EAccountList *account_list;
- EMailSession *session;
EAccount *account;
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);
@@ -359,7 +354,7 @@ account_prefs_delete_account (EAccountManager *manager)
/* Remove the account from the folder tree. */
if (account->enabled)
- e_mail_store_remove_by_account (session, account);
+ e_mail_store_remove_by_account (priv->backend, account);
/* Remove all the proxies the account has created. */
if (has_proxies)
@@ -423,7 +418,8 @@ em_account_prefs_init (EMAccountPrefs *prefs)
}
static void
-account_tree_view_sort_order_changed_cb (EAccountTreeView *tree_view, EMailBackend *backend)
+account_tree_view_sort_order_changed_cb (EAccountTreeView *tree_view,
+ EMailBackend *backend)
{
GSList *account_uids;