diff options
author | Milan Crha <mcrha@redhat.com> | 2009-10-13 22:24:10 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2009-10-13 22:24:10 +0800 |
commit | e06b88c4fda627599d7c1a33ddec0a35a4374e4f (patch) | |
tree | a862b4d3909923719ab03936ec60dfc00f185ba8 /modules/mail/e-mail-shell-backend.c | |
parent | dc2953040b0fb9576411d2f145e7e6ff11dd989a (diff) | |
download | gsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.tar.gz gsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.tar.zst gsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.zip |
Bug #594471 - Shouldn't call e_error_new/run with NULL 'parent'
Diffstat (limited to 'modules/mail/e-mail-shell-backend.c')
-rw-r--r-- | modules/mail/e-mail-shell-backend.c | 17 |
1 files changed, 2 insertions, 15 deletions
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; |