diff options
Diffstat (limited to 'mail/em-composer-utils.c')
-rw-r--r-- | mail/em-composer-utils.c | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index 0927d6fa90..21961ef573 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -374,13 +374,13 @@ composer_presend_check_identity (EMsgComposer *composer, table = e_msg_composer_get_header_table (composer); - client_cache = e_composer_header_table_ref_client_cache (table); - registry = e_client_cache_ref_registry (client_cache); - uid = e_composer_header_table_get_identity_uid (table); - source = e_source_registry_ref_source (registry, uid); + source = e_composer_header_table_ref_source (table, uid); g_return_val_if_fail (source != NULL, FALSE); + client_cache = e_composer_header_table_ref_client_cache (table); + registry = e_client_cache_ref_registry (client_cache); + if (!e_source_registry_check_enabled (registry, source)) { e_alert_submit ( E_ALERT_SINK (composer), @@ -843,8 +843,6 @@ em_utils_composer_save_to_drafts_cb (EMsgComposer *composer, { AsyncContext *context; EComposerHeaderTable *table; - EClientCache *client_cache; - ESourceRegistry *registry; ESource *source; const gchar *local_drafts_folder_uri; const gchar *identity_uid; @@ -858,14 +856,8 @@ em_utils_composer_save_to_drafts_cb (EMsgComposer *composer, table = e_msg_composer_get_header_table (composer); - client_cache = e_composer_header_table_ref_client_cache (table); - registry = e_client_cache_ref_registry (client_cache); - identity_uid = e_composer_header_table_get_identity_uid (table); - source = e_source_registry_ref_source (registry, identity_uid); - - g_clear_object (&client_cache); - g_clear_object (®istry); + source = e_composer_header_table_ref_source (table, identity_uid); /* Get the selected identity's preferred Drafts folder. */ if (source != NULL) { |