aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-autofilter.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-09-05 05:07:15 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-09-05 05:07:15 +0800
commit983fce5e535e4e203815767cf6899f6dc8c5242a (patch)
treed6ca3538c046798597275132c66be6da18733d7f /mail/mail-autofilter.c
parentc95a226217a68703c48397c23ea8accc491d44e4 (diff)
downloadgsoc2013-evolution-983fce5e535e4e203815767cf6899f6dc8c5242a.tar
gsoc2013-evolution-983fce5e535e4e203815767cf6899f6dc8c5242a.tar.gz
gsoc2013-evolution-983fce5e535e4e203815767cf6899f6dc8c5242a.tar.bz2
gsoc2013-evolution-983fce5e535e4e203815767cf6899f6dc8c5242a.tar.lz
gsoc2013-evolution-983fce5e535e4e203815767cf6899f6dc8c5242a.tar.xz
gsoc2013-evolution-983fce5e535e4e203815767cf6899f6dc8c5242a.tar.zst
gsoc2013-evolution-983fce5e535e4e203815767cf6899f6dc8c5242a.zip
Kill the default parent window hack in e-error.c.
Fix as many cases that relied on it as I could find, but there may be more cases out there. They should be fixed too. Passing a NULL parent window to e_error_new() is illegal and will emit a runtime warning.
Diffstat (limited to 'mail/mail-autofilter.c')
-rw-r--r--mail/mail-autofilter.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c
index ece7e75ca5..02fbbfbbc7 100644
--- a/mail/mail-autofilter.c
+++ b/mail/mail-autofilter.c
@@ -420,7 +420,10 @@ mail_filter_delete_uri(CamelStore *store, const gchar *uri)
deleted = rule_context_delete_uri ((RuleContext *) fc, euri, g_str_equal);
if (deleted) {
+ EShell *shell;
+ GtkWindow *parent;
GtkWidget *dialog;
+ GList *windows;
GString *s;
GList *l;
@@ -431,7 +434,10 @@ mail_filter_delete_uri(CamelStore *store, const gchar *uri)
l = l->next;
}
- dialog = e_error_new(NULL, "mail:filter-updated", s->str, euri, NULL);
+ shell = e_shell_get_default ();
+ windows = e_shell_get_watched_windows (shell);
+ parent = (windows != NULL) ? GTK_WINDOW (windows->data) : NULL;
+ dialog = e_error_new(parent, "mail:filter-updated", s->str, euri, NULL);
g_string_free(s, TRUE);
em_utils_show_info_silent (dialog);