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 | |
parent | dc2953040b0fb9576411d2f145e7e6ff11dd989a (diff) | |
download | gsoc2013-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')
-rw-r--r-- | modules/mail/e-mail-junk-hook.c | 11 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-backend.c | 17 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-migrate.c | 3 |
3 files changed, 6 insertions, 25 deletions
diff --git a/modules/mail/e-mail-junk-hook.c b/modules/mail/e-mail-junk-hook.c index f19b502f69..870ffe8377 100644 --- a/modules/mail/e-mail-junk-hook.c +++ b/modules/mail/e-mail-junk-hook.c @@ -50,17 +50,10 @@ static GType mail_junk_hook_type; static gboolean mail_junk_hook_idle_cb (struct ErrorData *data) { - EShell *shell; - GtkWindow *parent; GtkWidget *widget; - GList *windows; - shell = e_shell_get_default (); - windows = e_shell_get_watched_windows (shell); - parent = (windows != NULL) ? GTK_WINDOW (windows->data) : NULL; - - widget = e_error_new ( - parent, data->error_message, data->error->message, NULL); + widget = e_error_new (e_shell_get_active_window (NULL), + data->error_message, data->error->message, NULL); em_utils_show_error_silent (widget); g_error_free (data->error); 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; diff --git a/modules/mail/e-mail-shell-migrate.c b/modules/mail/e-mail-shell-migrate.c index 7176d4fba7..967f80053f 100644 --- a/modules/mail/e-mail-shell-migrate.c +++ b/modules/mail/e-mail-shell-migrate.c @@ -64,6 +64,7 @@ #include "e-util/e-signature-utils.h" #include "e-mail-shell-backend.h" +#include "shell/e-shell.h" #include "shell/e-shell-migrate.h" #include "e-mail-store.h" @@ -1597,7 +1598,7 @@ em_migrate_folder(EMMigrateSession *session, const gchar *dirname, const gchar * if (errno == EEXIST) { gint save = errno; - switch (e_error_run(NULL, "mail:ask-migrate-existing", src->str, dest->str, NULL)) { + switch (e_error_run (e_shell_get_active_window (NULL), "mail:ask-migrate-existing", src->str, dest->str, NULL)) { case GTK_RESPONSE_ACCEPT: mode = CP_OVERWRITE; goto retry_copy; |