From e06b88c4fda627599d7c1a33ddec0a35a4374e4f Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Tue, 13 Oct 2009 16:24:10 +0200 Subject: Bug #594471 - Shouldn't call e_error_new/run with NULL 'parent' --- modules/mail/e-mail-shell-backend.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'modules/mail/e-mail-shell-backend.c') diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c index c178e6d020..bad0a1a84d 100644 --- a/modules/mail/e-mail-shell-backend.c +++ b/modules/mail/e-mail-shell-backend.c @@ -410,17 +410,11 @@ mail_shell_backend_prepare_for_offline_cb (EShell *shell, EActivity *activity, EMailShellBackend *mail_shell_backend) { - GList *watched_windows; - GtkWidget *parent = NULL; gboolean synchronize = FALSE; - watched_windows = e_shell_get_watched_windows (shell); - if (watched_windows != NULL) - parent = GTK_WIDGET (watched_windows->data); - if (e_shell_get_network_available (shell)) synchronize = em_utils_prompt_user ( - GTK_WINDOW (parent), NULL, + e_shell_get_active_window (shell), NULL, "mail:ask-quick-offline", NULL); if (!synchronize) { @@ -658,8 +652,6 @@ mail_shell_backend_quit_requested_cb (EShell *shell, EShellBackend *shell_backend) { CamelFolder *folder; - GList *watched_windows; - GtkWindow *parent = NULL; guint32 unsent; gint response; @@ -680,12 +672,7 @@ mail_shell_backend_quit_requested_cb (EShell *shell, if (unsent == 0) return; - /* Try to find a parent window for the dialog. - * First list item is what's currently focused. */ - watched_windows = e_shell_get_watched_windows (shell); - if (watched_windows != NULL) - parent = GTK_WINDOW (watched_windows->data); - response = e_error_run (parent, "mail:exit-unsaved", NULL); + response = e_error_run (e_shell_get_active_window (shell), "mail:exit-unsaved", NULL); if (response == GTK_RESPONSE_YES) return; -- cgit v1.2.3