aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-01-11 01:17:29 +0800
committerMilan Crha <mcrha@redhat.com>2012-01-11 01:17:29 +0800
commita4afc774381b8da813b8a615a4e5f29fabbcee7c (patch)
treead09cc1960d97b14829dcf067861c33cb69c5531 /mail
parentf2994d54460e8467a525851bd92941730b548914 (diff)
downloadgsoc2013-evolution-a4afc774381b8da813b8a615a4e5f29fabbcee7c.tar
gsoc2013-evolution-a4afc774381b8da813b8a615a4e5f29fabbcee7c.tar.gz
gsoc2013-evolution-a4afc774381b8da813b8a615a4e5f29fabbcee7c.tar.bz2
gsoc2013-evolution-a4afc774381b8da813b8a615a4e5f29fabbcee7c.tar.lz
gsoc2013-evolution-a4afc774381b8da813b8a615a4e5f29fabbcee7c.tar.xz
gsoc2013-evolution-a4afc774381b8da813b8a615a4e5f29fabbcee7c.tar.zst
gsoc2013-evolution-a4afc774381b8da813b8a615a4e5f29fabbcee7c.zip
Slow start due to instant saving of no change in an EAccountList
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-account-store.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/mail/e-mail-account-store.c b/mail/e-mail-account-store.c
index e0bd90ea3f..e5a630850c 100644
--- a/mail/e-mail-account-store.c
+++ b/mail/e-mail-account-store.c
@@ -462,6 +462,7 @@ mail_account_store_service_removed (EMailAccountStore *store,
EAccountList *account_list;
EAccount *account;
+ CamelProvider *provider;
const gchar *uid;
account_list = e_get_account_list ();
@@ -469,15 +470,15 @@ mail_account_store_service_removed (EMailAccountStore *store,
account = e_get_account_by_uid (uid);
g_return_if_fail (account != NULL);
- if (account->enabled) {
- CamelProvider *provider;
+ /* no change */
+ if (!account->enabled)
+ return;
- provider = camel_service_get_provider (service);
- g_return_if_fail (provider != NULL);
+ provider = camel_service_get_provider (service);
+ g_return_if_fail (provider != NULL);
- if (provider->flags & CAMEL_PROVIDER_IS_STORAGE)
- mail_disconnect_store (CAMEL_STORE (service));
- }
+ if (provider->flags & CAMEL_PROVIDER_IS_STORAGE)
+ mail_disconnect_store (CAMEL_STORE (service));
/* Remove all the proxies the account has created.
* FIXME This proxy stuff belongs in evolution-groupwise. */
@@ -521,6 +522,10 @@ mail_account_store_service_enabled (EMailAccountStore *store,
account = e_get_account_by_uid (uid);
g_return_if_fail (account != NULL);
+ /* no change */
+ if (account->enabled)
+ return;
+
account->enabled = TRUE;
e_account_list_change (account_list, account);
@@ -562,6 +567,10 @@ mail_account_store_service_disabled (EMailAccountStore *store,
account = e_get_account_by_uid (uid);
g_return_if_fail (account != NULL);
+ /* no change */
+ if (!account->enabled)
+ return;
+
account->enabled = FALSE;
provider = camel_service_get_provider (service);