[evolution] Kill MailSession's interactive flag.



commit f65f8935bce5538d490d872e9838874c83717953
Author: Matthew Barnes <mbarnes redhat com>
Date:   Wed Dec 16 13:39:39 2009 -0500

    Kill MailSession's interactive flag.
    
    After analyzing this again I'm confident we really don't need it.
    
    The only state change is from FALSE to TRUE at startup, and that
    one-time event happens while the mail shell backend is starting up
    (see: e_shell_backend_start()).
    
    If a need arises to query for this in the future I'll extend the
    EShellBackend API with an e_shell_backend_started() function, but
    for now there's no need.

 mail/mail-mt.c                      |    4 ----
 mail/mail-session.c                 |   33 ---------------------------------
 mail/mail-session.h                 |    2 --
 modules/mail/e-mail-shell-backend.c |    3 ---
 4 files changed, 0 insertions(+), 42 deletions(-)
---
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index b0c8ee8..e2f6900 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -249,10 +249,6 @@ mail_msg_check_error (gpointer msg)
 	checkmem(m->priv);
 #endif
 
-	/* don't report any errors if we are not in interactive mode */
-	if (!mail_session_get_interactive ())
-		return;
-
 	if (!camel_exception_is_set(&m->ex)
 	    || m->ex.id == CAMEL_EXCEPTION_USER_CANCEL
 	    || m->ex.id == CAMEL_EXCEPTION_FOLDER_INVALID_UID
diff --git a/mail/mail-session.c b/mail/mail-session.c
index e9ad274..2360c06 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -755,39 +755,6 @@ mail_session_shutdown (void)
 	camel_shutdown ();
 }
 
-gboolean
-mail_session_get_interactive (void)
-{
-	return MAIL_SESSION (session)->interactive;
-}
-
-void
-mail_session_set_interactive (gboolean interactive)
-{
-	MAIL_SESSION (session)->interactive = interactive;
-
-	if (!interactive) {
-		struct _user_message_msg *msg;
-
-		d(printf ("Gone non-interactive, checking for outstanding interactive tasks\n"));
-
-		e_passwords_cancel();
-
-		/* flush/cancel pending user messages */
-		while (!g_queue_is_empty (&user_message_queue)) {
-			msg = g_queue_pop_head (&user_message_queue);
-			e_flag_set (msg->done);
-			mail_msg_unref (msg);
-		}
-
-		/* and the current */
-		if (user_message_dialog) {
-			d(printf("Destroying message dialogue\n"));
-			gtk_widget_destroy ((GtkWidget *) user_message_dialog);
-		}
-	}
-}
-
 void
 mail_session_flush_filter_log (void)
 {
diff --git a/mail/mail-session.h b/mail/mail-session.h
index ccca89d..9531852 100644
--- a/mail/mail-session.h
+++ b/mail/mail-session.h
@@ -31,8 +31,6 @@ G_BEGIN_DECLS
 
 void mail_session_init (EShellBackend *shell_backend);
 void mail_session_shutdown (void);
-gboolean mail_session_get_interactive (void);
-void mail_session_set_interactive (gboolean interactive);
 gchar *mail_session_request_dialog (const gchar *prompt, gboolean secret,
 				   const gchar *key, gboolean async);
 gboolean mail_session_accept_dialog (const gchar *prompt, const gchar *key,
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index 6b96e8b..ef25000 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -536,9 +536,6 @@ mail_shell_backend_start (EShellBackend *shell_backend)
 	shell = e_shell_backend_get_shell (shell_backend);
 	shell_settings = e_shell_get_shell_settings (shell);
 
-	/* XXX Do we really still need this flag? */
-	mail_session_set_interactive (TRUE);
-
 	enable_search_folders = e_shell_settings_get_boolean (
 		shell_settings, "mail-enable-search-folders");
 	if (enable_search_folders)



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