[evolution/express2: 1/3] Find a better transient parent if we are not passed a window; fixes some transience issues in the ca
- From: Michael Meeks <michael src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/express2: 1/3] Find a better transient parent if we are not passed a window; fixes some transience issues in the ca
- Date: Wed, 19 May 2010 14:23:32 +0000 (UTC)
commit 115ae99796dd1988fe1ecc0e1fba90b4f982978d
Author: Michael Meeks <michael meeks novell com>
Date: Wed May 19 14:41:16 2010 +0100
Find a better transient parent if we are not passed a window; fixes
some transience issues in the calendar dialog re-layout.
e-util/e-dialog-utils.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/e-util/e-dialog-utils.c b/e-util/e-dialog-utils.c
index 19d9030..832d1b8 100644
--- a/e-util/e-dialog-utils.c
+++ b/e-util/e-dialog-utils.c
@@ -46,6 +46,7 @@ e_notice (gpointer parent, GtkMessageType type, const gchar *format, ...)
va_start (args, format);
str = g_strdup_vprintf (format, args);
+
dialog = gtk_message_dialog_new (NULL,
GTK_DIALOG_DESTROY_WITH_PARENT,
type,
@@ -55,8 +56,11 @@ e_notice (gpointer parent, GtkMessageType type, const gchar *format, ...)
va_end (args);
g_free (str);
+ if (parent && !gtk_widget_is_toplevel (parent))
+ parent = gtk_widget_get_toplevel (parent);
if (parent)
gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
+
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]