aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Bradford <rob@linux.intel.com>2010-08-02 23:51:31 +0800
committerRob Bradford <rob@linux.intel.com>2010-08-03 00:06:32 +0800
commit73b7238f07ec0f932bb7666f38d46aa282eac8da (patch)
treef7b57093341b78d5533f7e184fcfe8e5b53f43d7
parent5ca8930126afea17cd80545957a686a862168d2a (diff)
downloadgsoc2013-evolution-73b7238f07ec0f932bb7666f38d46aa282eac8da.tar
gsoc2013-evolution-73b7238f07ec0f932bb7666f38d46aa282eac8da.tar.gz
gsoc2013-evolution-73b7238f07ec0f932bb7666f38d46aa282eac8da.tar.bz2
gsoc2013-evolution-73b7238f07ec0f932bb7666f38d46aa282eac8da.tar.lz
gsoc2013-evolution-73b7238f07ec0f932bb7666f38d46aa282eac8da.tar.xz
gsoc2013-evolution-73b7238f07ec0f932bb7666f38d46aa282eac8da.tar.zst
gsoc2013-evolution-73b7238f07ec0f932bb7666f38d46aa282eac8da.zip
mail-session: Use the shell's active window as parent for dialog
This means that when the mail session generates an EAlertDialog e.g. for SSL certificate validity we can provide a parent window for the dialog. Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=625846
-rw-r--r--mail/mail-session.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mail/mail-session.c b/mail/mail-session.c
index d55ef61969..f120d2f4d5 100644
--- a/mail/mail-session.c
+++ b/mail/mail-session.c
@@ -344,6 +344,7 @@ user_message_response (GtkDialog *dialog, gint button, struct _user_message_msg
static void
user_message_exec (struct _user_message_msg *m)
{
+ GtkWindow *parent;
const gchar *error_type;
if (!m->ismain && user_message_dialog != NULL) {
@@ -372,10 +373,10 @@ user_message_exec (struct _user_message_msg *m)
g_return_if_reached ();
}
- /* The mail daemon won't have a window here, so there's nothing to set
- * as the parent */
+ /* Pull in the active window from the shell to get a parent window */
+ parent = e_shell_get_active_window (e_shell_get_default ());
user_message_dialog =
- e_alert_dialog_new_for_args (NULL, error_type, m->prompt, NULL);
+ e_alert_dialog_new_for_args (parent, error_type, m->prompt, NULL);
g_object_set (
user_message_dialog, "allow_shrink", TRUE,
"allow_grow", TRUE, NULL);