diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-09-05 05:07:15 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-09-05 05:07:15 +0800 |
commit | 983fce5e535e4e203815767cf6899f6dc8c5242a (patch) | |
tree | d6ca3538c046798597275132c66be6da18733d7f /mail/mail-vfolder.c | |
parent | c95a226217a68703c48397c23ea8accc491d44e4 (diff) | |
download | gsoc2013-evolution-983fce5e535e4e203815767cf6899f6dc8c5242a.tar.gz 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-vfolder.c')
-rw-r--r-- | mail/mail-vfolder.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c index 96d60ab5f0..69ba7d4d98 100644 --- a/mail/mail-vfolder.c +++ b/mail/mail-vfolder.c @@ -600,11 +600,17 @@ done: UNLOCK(); if (changed->str[0]) { + EShell *shell; + GtkWindow *parent; GtkWidget *dialog; + GList *windows; const gchar *data_dir; gchar *user; - dialog = e_error_new(NULL, "mail:vfolder-updated", changed->str, uri, 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:vfolder-updated", changed->str, uri, NULL); em_utils_show_info_silent (dialog); data_dir = em_utils_get_data_dir (); @@ -1095,9 +1101,17 @@ 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(NULL, "mail:vfolder-notexist", uri, NULL); + w = e_error_new(parent, "mail:vfolder-notexist", uri, NULL); em_utils_show_error_silent (w); } |