[evolution-patches] e-error parent fix
- From: William Jon McCann <mccannwj pha jhu edu>
- To: Evolution Patches <evolution-patches lists ximian com>
- Subject: [evolution-patches] e-error parent fix
- Date: Mon, 19 Jul 2004 03:14:54 -0400
Hi,
This patch ensures that the default_parent of the e-error dialog is a
toplevel widget.
Without this, mail is setting the default parent to a non-toplevel
widget. This causes gtk_window_set_transient_for() to fail and the
dialog will show up in other workspaces/screens.
Is this ok to commit?
Jon
Index: misc/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/ChangeLog,v
retrieving revision 1.319
diff -p -u -r1.319 ChangeLog
--- misc/ChangeLog 16 Jul 2004 08:11:59 -0000 1.319
+++ misc/ChangeLog 19 Jul 2004 07:08:26 -0000
@@ -1,3 +1,8 @@
+2004-07-19 William Jon McCann <mccann jhu edu>
+
+ * e-error.c (e_error_newv): Ensure that the parent is a toplevel
+ widget.
+
2004-07-16 Chris Toshok <toshok ximian com>
* e-clipped-label.c (e_clipped_label_recalc_chars_displayed):
Index: misc/e-error.c
===================================================================
RCS file: /cvs/gnome/evolution/widgets/misc/e-error.c,v
retrieving revision 1.13
diff -p -u -r1.13 e-error.c
--- misc/e-error.c 24 Jun 2004 21:40:58 -0000 1.13
+++ misc/e-error.c 19 Jul 2004 07:08:27 -0000
@@ -384,6 +384,7 @@ e_error_newv(GtkWindow *parent, const ch
struct _e_error *e;
struct _e_error_button *b;
GtkWidget *hbox, *w;
+ GtkWidget *toplevel;
char *tmp, *domain, *id;
GString *out;
GPtrArray *args;
@@ -399,9 +400,10 @@ e_error_newv(GtkWindow *parent, const ch
if (parent == NULL && ee_parent_list)
parent = (GtkWindow *)ee_parent_list->data;
- if (parent)
- gtk_window_set_transient_for((GtkWindow *)dialog, parent);
- else
+ if (parent) {
+ toplevel = gtk_widget_get_toplevel((GtkWidget *)parent);
+ gtk_window_set_transient_for((GtkWindow *)dialog, (GtkWindow *)toplevel);
+ } else
g_warning("No parent set, or default parent available for error dialog");
domain = alloca(strlen(tag)+1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]