aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail/e-mail-shell-backend.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-10-13 22:24:10 +0800
committerMilan Crha <mcrha@redhat.com>2009-10-13 22:24:10 +0800
commite06b88c4fda627599d7c1a33ddec0a35a4374e4f (patch)
treea862b4d3909923719ab03936ec60dfc00f185ba8 /modules/mail/e-mail-shell-backend.c
parentdc2953040b0fb9576411d2f145e7e6ff11dd989a (diff)
downloadgsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.tar
gsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.tar.gz
gsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.tar.bz2
gsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.tar.lz
gsoc2013-evolution-e06b88c4fda627599d7c1a33ddec0a35a4374e4f.tar.xz
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.c17
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;