[evolution] The shell backend is responsibile for setting the MailSession online



commit ec626660cfc5e2869a02c621247a7e0b02508151
Author: Jonathon Jongsma <jonathon quotidian org>
Date:   Thu Dec 17 15:38:50 2009 -0600

    The shell backend is responsibile for setting the MailSession online
    
    Previously the mail session set itself online inside mail_session_init() by
    checking whether the shell was online.  This removes one more dependency from
    MailSession to EShell by moving that responsibility up one level.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=604952

 mail/e-mail-backend.c |    2 ++
 mail/mail-session.c   |    6 ------
 2 files changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/mail/e-mail-backend.c b/mail/e-mail-backend.c
index 30b691e..dca7217 100644
--- a/mail/e-mail-backend.c
+++ b/mail/e-mail-backend.c
@@ -387,6 +387,8 @@ mail_backend_constructed (GObject *object)
 
 	/* This also initializes Camel, so it needs to happen early. */
 	mail_session_init (shell_backend);
+
+	camel_session_set_online ((CamelSession *) session, e_shell_get_online (shell));
 	e_account_combo_box_set_session (session);  /* XXX Don't ask... */
 
 	folder_cache = mail_folder_cache_get_default ();
diff --git a/mail/mail-session.c b/mail/mail-session.c
index dc7e40d..c7e86da 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -798,12 +798,7 @@ mail_session_check_junk_notify (GConfClient *gconf, guint id, GConfEntry *entry,
 void
 mail_session_init (EShellBackend *shell_backend)
 {
-	EShell *shell;
 	GConfClient *gconf;
-	gboolean online;
-
-	shell = e_shell_backend_get_shell (shell_backend);
-	online = e_shell_get_online (shell);
 
 	if (camel_init (e_get_user_data_dir (), TRUE) != 0)
 		exit (0);
@@ -826,7 +821,6 @@ mail_session_init (EShellBackend *shell_backend)
 								session, NULL, NULL);
 	session->junk_plugin = NULL;
 
-	camel_session_set_online ((CamelSession *) session, online);
 	mail_config_reload_junk_headers ();
 }
 



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