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 /mail/mail-vfolder.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 'mail/mail-vfolder.c')
-rw-r--r-- | mail/mail-vfolder.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c index 69ba7d4d98..b20cc266f2 100644 --- a/mail/mail-vfolder.c +++ b/mail/mail-vfolder.c @@ -600,17 +600,11 @@ done: UNLOCK(); if (changed->str[0]) { - EShell *shell; - GtkWindow *parent; GtkWidget *dialog; - GList *windows; const gchar *data_dir; gchar *user; - 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:vfolder-updated", changed->str, uri, NULL); + dialog = e_error_new (e_shell_get_active_window (NULL), "mail:vfolder-updated", changed->str, uri, NULL); em_utils_show_info_silent (dialog); data_dir = em_utils_get_data_dir (); @@ -1101,17 +1095,10 @@ vfolder_edit_rule(const gchar *uri) g_signal_connect(gd, "response", G_CALLBACK(edit_rule_response), NULL); gtk_widget_show((GtkWidget *)gd); } else { - EShell *shell; - GtkWindow *parent; GtkWidget *w; - GList *windows; - - shell = e_shell_get_default (); - windows = e_shell_get_watched_windows (shell); - parent = (windows != NULL) ? GTK_WINDOW (windows->data) : NULL; /* TODO: we should probably just create it ... */ - w = e_error_new(parent, "mail:vfolder-notexist", uri, NULL); + w = e_error_new (e_shell_get_active_window (NULL), "mail:vfolder-notexist", uri, NULL); em_utils_show_error_silent (w); } @@ -1127,13 +1114,13 @@ new_rule_clicked(GtkWidget *w, gint button, gpointer data) gchar *user; FilterRule *rule = g_object_get_data((GObject *)w, "rule"); - if (!filter_rule_validate(rule)) { + if (!filter_rule_validate (rule, GTK_WINDOW (w))) { /* no need to popup a dialog because the validate code does that. */ return; } if (rule_context_find_rule ((RuleContext *)context, rule->name, rule->source)) { - e_error_run((GtkWindow *)w, "mail:vfolder-notunique", rule->name, NULL); + e_error_run ((GtkWindow *)w, "mail:vfolder-notunique", rule->name, NULL); return; } |