From 4d58a800fa36927567f6c0d22617c260e8e7172b Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 9 Mar 2013 19:11:44 -0500 Subject: Use e_source_registry_list_enabled() where appropriate. --- e-util/e-mail-identity-combo-box.c | 5 +---- e-util/e-name-selector-entry.c | 6 +----- e-util/e-name-selector.c | 6 +----- 3 files changed, 3 insertions(+), 14 deletions(-) (limited to 'e-util') diff --git a/e-util/e-mail-identity-combo-box.c b/e-util/e-mail-identity-combo-box.c index b76e0ee6bc..9561ba7f98 100644 --- a/e-util/e-mail-identity-combo-box.c +++ b/e-util/e-mail-identity-combo-box.c @@ -278,7 +278,7 @@ e_mail_identity_combo_box_refresh (EMailIdentityComboBox *combo_box) extension_name = E_SOURCE_EXTENSION_MAIL_IDENTITY; registry = e_mail_identity_combo_box_get_registry (combo_box); - list = e_source_registry_list_sources (registry, extension_name); + list = e_source_registry_list_enabled (registry, extension_name); /* Build a hash table of GQueues by email address so we can * spot duplicate email addresses. Then if the GQueue for a @@ -326,9 +326,6 @@ e_mail_identity_combo_box_refresh (EMailIdentityComboBox *combo_box) source = E_SOURCE (link->data); - if (!e_source_registry_check_enabled (registry, source)) - continue; - extension = e_source_get_extension (source, extension_name); name = e_source_mail_identity_get_name (extension); address = e_source_mail_identity_get_address (extension); diff --git a/e-util/e-name-selector-entry.c b/e-util/e-name-selector-entry.c index 78b82f2cdb..12dddb83c1 100644 --- a/e-util/e-name-selector-entry.c +++ b/e-util/e-name-selector-entry.c @@ -2281,7 +2281,7 @@ setup_default_contact_store (ENameSelectorEntry *name_selector_entry) client_cache = e_name_selector_entry_ref_client_cache (name_selector_entry); registry = e_client_cache_ref_registry (client_cache); - list = e_source_registry_list_sources (registry, extension_name); + list = e_source_registry_list_enabled (registry, extension_name); for (iter = list; iter != NULL; iter = g_list_next (iter)) { ESource *source = E_SOURCE (iter->data); @@ -2292,10 +2292,6 @@ setup_default_contact_store (ENameSelectorEntry *name_selector_entry) extension_name = E_SOURCE_EXTENSION_AUTOCOMPLETE; extension = e_source_get_extension (source, extension_name); - /* Skip disabled address books. */ - if (!e_source_registry_check_enabled (registry, source)) - continue; - /* Skip non-completion address books. */ if (!e_source_autocomplete_get_include_me (extension)) continue; diff --git a/e-util/e-name-selector.c b/e-util/e-name-selector.c index f6e6658731..9f2f48cea8 100644 --- a/e-util/e-name-selector.c +++ b/e-util/e-name-selector.c @@ -172,7 +172,7 @@ e_name_selector_load_books (ENameSelector *name_selector) client_cache = e_name_selector_ref_client_cache (name_selector); registry = e_client_cache_ref_registry (client_cache); - list = e_source_registry_list_sources (registry, extension_name); + list = e_source_registry_list_enabled (registry, extension_name); for (iter = list; iter != NULL; iter = g_list_next (iter)) { ESource *source = E_SOURCE (iter->data); @@ -182,10 +182,6 @@ e_name_selector_load_books (ENameSelector *name_selector) extension_name = E_SOURCE_EXTENSION_AUTOCOMPLETE; extension = e_source_get_extension (source, extension_name); - /* Skip disabled address books. */ - if (!e_source_registry_check_enabled (registry, source)) - continue; - /* Only load address books with autocomplete enabled, * so as to avoid unnecessary authentication prompts. */ if (!e_source_autocomplete_get_include_me (extension)) -- cgit