aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-backend.c5
-rw-r--r--mail/e-mail-ui-session.c8
2 files changed, 8 insertions, 5 deletions
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c
index 5eb408105b..81a16ed745 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 c86de6af0e..4af8907440 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);