diff options
Diffstat (limited to 'mail/e-mail-account-store.c')
-rw-r--r-- | mail/e-mail-account-store.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mail/e-mail-account-store.c b/mail/e-mail-account-store.c index d344d5c60d..9dde7561c5 100644 --- a/mail/e-mail-account-store.c +++ b/mail/e-mail-account-store.c @@ -1061,6 +1061,7 @@ e_mail_account_store_add_service (EMailAccountStore *store, } else { EMailSession *session; ESourceRegistry *registry; + ESourceCollection *collection; ESource *source; session = e_mail_account_store_get_session (store); @@ -1069,6 +1070,17 @@ e_mail_account_store_add_service (EMailAccountStore *store, source = e_source_registry_ref_source (registry, uid); g_return_if_fail (source != NULL); + /* If this ESource is part of a collection, we need to + * pick up the enabled state for the entire collection. + * Check the ESource and its ancestors for a collection + * extension and read from the containing source. */ + collection = e_source_registry_find_extension ( + registry, source, E_SOURCE_EXTENSION_COLLECTION); + if (collection != NULL) { + g_object_unref (source); + source = collection; + } + builtin = FALSE; enabled = e_source_get_enabled (source); |