[PATCH] transient dialog from color-picker

The color-picker widget opens up a dialog to choose
the color but this dialog is not marked as transient.
Is there a reson why this doesn't happen?

I've included a patch that fixes it.

The same problem is probably present for other widgets that
opens dialogs but I have just fixed the color-picker. I could
fix the rest also it no one complains. But it's maybe easier for
someone else with cvs-access to fix it.

I have several other small fixes for gnome & gtk. Where should I
send patches, this list?

ps. I assume gtk_widget_get_toplevel() always returns a
GTK_WINDOW. Correct?

--- gnome-libs-1.2.4.orig/libgnomeui/gnome-color-picker.c	Sat May  6 17:30:30 2000
+++ gnome-libs-1.2.4/libgnomeui/gnome-color-picker.c	Tue Aug  1 23:27:28 2000
@@ -452,6 +452,7 @@
 	} else {
 		/* Create the dialog and connects its buttons */
+		GtkWidget *toplevel;
 		cp->cs_dialog = gtk_color_selection_dialog_new (cp->title);
 		gnome_window_icon_set_from_default (GTK_WINDOW (cp->cs_dialog));
@@ -473,6 +474,9 @@
 		/* FIXME: do something about the help button */
 		gtk_window_set_position (GTK_WINDOW (cp->cs_dialog), GTK_WIN_POS_MOUSE);
+		toplevel = gtk_widget_get_toplevel (GTK_WIDGET (cp));
+		gtk_window_set_transient_for (GTK_WINDOW (cp->cs_dialog), GTK_WINDOW (toplevel));
 		/* If there is a grabed window, set new dialog as modal */
 		if (gtk_grab_get_current())

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]