diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-11-01 03:18:20 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-11-01 03:18:20 +0800 |
commit | 9bcde61c4756cc03d208d4684242019693a127fd (patch) | |
tree | f243370a11892be9c9d64e7c688d2b6fe38d66e5 /libemail-engine | |
parent | 9e64b59c9d838b3d0a55b0eb95fc088ec26f1644 (diff) | |
download | gsoc2013-evolution-9bcde61c4756cc03d208d4684242019693a127fd.tar gsoc2013-evolution-9bcde61c4756cc03d208d4684242019693a127fd.tar.gz gsoc2013-evolution-9bcde61c4756cc03d208d4684242019693a127fd.tar.bz2 gsoc2013-evolution-9bcde61c4756cc03d208d4684242019693a127fd.tar.lz gsoc2013-evolution-9bcde61c4756cc03d208d4684242019693a127fd.tar.xz gsoc2013-evolution-9bcde61c4756cc03d208d4684242019693a127fd.tar.zst gsoc2013-evolution-9bcde61c4756cc03d208d4684242019693a127fd.zip |
mail_session_refresh_cb(): Skip disabled sources.
Diffstat (limited to 'libemail-engine')
-rw-r--r-- | libemail-engine/e-mail-session.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libemail-engine/e-mail-session.c b/libemail-engine/e-mail-session.c index d89515eedd..63d5792965 100644 --- a/libemail-engine/e-mail-session.c +++ b/libemail-engine/e-mail-session.c @@ -435,13 +435,21 @@ mail_session_set_junk_filter_name (EMailSession *session, static void mail_session_refresh_cb (ESource *source, - CamelSession *session) + EMailSession *session) { + ESourceRegistry *registry; CamelService *service; const gchar *uid; + registry = e_mail_session_get_registry (session); + + /* Skip the signal emission if the source + * or any of its ancestors are disabled. */ + if (!e_source_registry_check_enabled (registry, source)) + return; + uid = e_source_get_uid (source); - service = camel_session_ref_service (session, uid); + service = camel_session_ref_service (CAMEL_SESSION (session), uid); g_return_if_fail (service != NULL); g_signal_emit (session, signals[REFRESH_SERVICE], 0, service); |