[evolution] Remove MailSession's last dep on EShell



commit e919ac51ab751df25f13f168ba99c485bf9a6d76
Author: Jonathon Jongsma <jonathon quotidian org>
Date:   Thu Dec 17 16:18:32 2009 -0600

    Remove MailSession's last dep on EShell
    
    When MailSession moves to a daemon process, there will be no shell object to
    query for the active window (and indeed there will often be no window in any
    case), so we can't specify a parent for the error dialog.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=604952

 mail/mail-session.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/mail/mail-session.c b/mail/mail-session.c
index c7e86da..1aa1972 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -49,7 +49,6 @@
 #include "e-util/e-util.h"
 #include "e-util/e-alert-dialog.h"
 #include "e-util/e-util-private.h"
-#include "shell/e-shell.h"
 
 #include "em-composer-utils.h"
 #include "em-filter-context.h"
@@ -358,8 +357,10 @@ user_message_exec (struct _user_message_msg *m)
 			g_return_if_reached ();
 	}
 
-	user_message_dialog = e_alert_dialog_new_for_args (
-		e_shell_get_active_window (NULL), error_type, m->prompt, NULL);
+	/* The mail daemon won't have a window here, so there's nothing to set
+	 * as the parent */
+	user_message_dialog =
+		e_alert_dialog_new_for_args (NULL, error_type, m->prompt, NULL);
 	g_object_set (
 		user_message_dialog, "allow_shrink", TRUE,
 		"allow_grow", TRUE, NULL);



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