aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-10-25 23:05:02 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-10-26 01:01:50 +0800
commitaded0858c49c3b729564a35427e3affb514fffb9 (patch)
treefe15021104e6d8203d89a566ef519acfe52d5c67 /mail
parente7981244a68c9d0b6b93d8c2697569668098b647 (diff)
downloadgsoc2013-evolution-aded0858c49c3b729564a35427e3affb514fffb9.tar
gsoc2013-evolution-aded0858c49c3b729564a35427e3affb514fffb9.tar.gz
gsoc2013-evolution-aded0858c49c3b729564a35427e3affb514fffb9.tar.bz2
gsoc2013-evolution-aded0858c49c3b729564a35427e3affb514fffb9.tar.lz
gsoc2013-evolution-aded0858c49c3b729564a35427e3affb514fffb9.tar.xz
gsoc2013-evolution-aded0858c49c3b729564a35427e3affb514fffb9.tar.zst
gsoc2013-evolution-aded0858c49c3b729564a35427e3affb514fffb9.zip
Prefer e_source_registry_check_enabled().
Prefer e_source_registry_check_enabled() over e_source_get_enabled() for most instances where we want to exclude disabled data sources.
Diffstat (limited to 'mail')
-rw-r--r--mail/em-composer-utils.c12
-rw-r--r--mail/em-utils.c3
2 files changed, 9 insertions, 6 deletions
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index b97883061b..19784351ef 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -378,7 +378,7 @@ composer_presend_check_identity (EMsgComposer *composer,
source = e_source_registry_ref_source (registry, uid);
g_return_val_if_fail (source != NULL, FALSE);
- if (!e_source_get_enabled (source)) {
+ if (!e_source_registry_check_enabled (registry, source)) {
e_alert_submit (
E_ALERT_SINK (composer),
"mail:send-no-account-enabled", NULL);
@@ -2450,8 +2450,10 @@ generate_recipient_hash (ESourceRegistry *registry)
* identities at all and so we should never get here. */
g_warn_if_fail (default_source != NULL);
- source_is_default = e_source_equal (source, default_source);
- source_is_enabled = e_source_get_enabled (source);
+ source_is_default =
+ e_source_equal (source, default_source);
+ source_is_enabled =
+ e_source_registry_check_enabled (registry, source);
extension_name = E_SOURCE_EXTENSION_MAIL_IDENTITY;
extension = e_source_get_extension (source, extension_name);
@@ -2466,8 +2468,8 @@ generate_recipient_hash (ESourceRegistry *registry)
if (cached_source != NULL) {
cached_is_default = e_source_equal (
cached_source, default_source);
- cached_is_enabled =
- e_source_get_enabled (cached_source);
+ cached_is_enabled = e_source_registry_check_enabled (
+ registry, cached_source);
} else {
cached_is_default = FALSE;
cached_is_enabled = FALSE;
diff --git a/mail/em-utils.c b/mail/em-utils.c
index f7f12e5755..80967f1f52 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -1424,7 +1424,8 @@ em_utils_empty_trash (GtkWidget *parent,
source = e_source_registry_ref_source (registry, uid);
if (source != NULL) {
- enabled = e_source_get_enabled (source);
+ enabled = e_source_registry_check_enabled (
+ registry, source);
g_object_unref (source);
}