[evolution] EMailConfigNotebook: Minor code cleanup.



commit 9f9b8c590221d33530e23c33002058d5f30451bb
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Jun 22 09:33:18 2012 -0400

    EMailConfigNotebook: Minor code cleanup.

 mail/e-mail-config-notebook.c |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/mail/e-mail-config-notebook.c b/mail/e-mail-config-notebook.c
index 5d04c47..4a9b62c 100644
--- a/mail/e-mail-config-notebook.c
+++ b/mail/e-mail-config-notebook.c
@@ -299,12 +299,13 @@ mail_config_notebook_constructed (GObject *object)
 	ESourceExtension *extension;
 	ESourceMailIdentity *mail_identity_extension;
 	EMailConfigServiceBackend *backend;
-	CamelProvider *provider;
+	CamelProvider *provider = NULL;
 	EMailSession *session;
 	EMailConfigPage *page;
 	const gchar *extension_name;
 	gboolean add_receiving_page = TRUE;
 	gboolean add_sending_page = TRUE;
+	gboolean add_transport_source;
 
 	notebook = E_MAIL_CONFIG_NOTEBOOK (object);
 
@@ -356,7 +357,8 @@ mail_config_notebook_constructed (GObject *object)
 			G_BINDING_SYNC_CREATE);
 	}
 
-	provider = backend ? e_mail_config_service_backend_get_provider (backend) : NULL;
+	if (backend != NULL)
+		provider = e_mail_config_service_backend_get_provider (backend);
 
 	/*** Receiving Options (conditional) ***/
 
@@ -372,7 +374,11 @@ mail_config_notebook_constructed (GObject *object)
 
 	/*** Sending Page (conditional) ***/
 
-	if (provider && !CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT (provider)) {
+	add_transport_source =
+		(provider != NULL) &&
+		(!CAMEL_PROVIDER_IS_STORE_AND_TRANSPORT (provider));
+
+	if (add_transport_source) {
 		page = e_mail_config_sending_page_new (registry);
 		e_mail_config_service_page_add_scratch_source (
 			E_MAIL_CONFIG_SERVICE_PAGE (page),



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]