[evolution] Bug #679780 - Offline mode doesn't work in mailer



commit ce0d35f99fcae5a307259b6abaf3a5b447ade003
Author: Milan Crha <mcrha redhat com>
Date:   Wed Sep 5 13:24:11 2012 +0200

    Bug #679780 - Offline mode doesn't work in mailer

 mail/e-mail-backend.c    |    5 -----
 mail/e-mail-ui-session.c |    8 ++++++++
 2 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c
index 5eb4081..81a16ed 100644
--- a/mail/e-mail-backend.c
+++ b/mail/e-mail-backend.c
@@ -1039,11 +1039,6 @@ mail_backend_constructed (GObject *object)
 		priv->session, "flush-outbox",
 		G_CALLBACK (mail_send), priv->session);
 
-	g_object_bind_property (
-		shell, "online",
-		priv->session, "online",
-		G_BINDING_SYNC_CREATE);
-
 	/* Propagate "activity-added" signals from
 	 * the mail session to the shell backend. */
 	g_signal_connect_swapped (
diff --git a/mail/e-mail-ui-session.c b/mail/e-mail-ui-session.c
index c86de6a..4af8907 100644
--- a/mail/e-mail-ui-session.c
+++ b/mail/e-mail-ui-session.c
@@ -540,8 +540,16 @@ mail_ui_session_constructed (GObject *object)
 	EMFolderTreeModel *folder_tree_model;
 	ESourceRegistry *registry;
 	EMailSession *session;
+	EShell *shell;
 
 	session = E_MAIL_SESSION (object);
+	shell = e_shell_get_default ();
+
+	/* synchronize online state first, before any CamelService is created */
+	g_object_bind_property (
+		shell, "online",
+		session, "online",
+		G_BINDING_SYNC_CREATE);
 
 	priv = E_MAIL_UI_SESSION_GET_PRIVATE (object);
 	priv->account_store = e_mail_account_store_new (session);



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