GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit 685d8ecf authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Fix the handling of modality by copying what GtkFileChooserButton does.

2006-05-24  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfontbutton.c (gtk_font_button_clicked):
	* gtk/gtkcolorbutton.c (gtk_color_button_clicked):
	Fix the handling of modality by copying what
	GtkFileChooserButton does.  (#342754, Yevgen Muntyan)
parent d6f2aada
2006-05-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfontbutton.c (gtk_font_button_clicked):
* gtk/gtkcolorbutton.c (gtk_color_button_clicked):
Fix the handling of modality by copying what
GtkFileChooserButton does. (#342754, Yevgen Muntyan)
* gtk/gtkprintunixdialog.c (create_main_page): Make
the range entry insensitive if another range option
is selected. (#342783, Caolan McNamara)
......
2006-05-24 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfontbutton.c (gtk_font_button_clicked):
* gtk/gtkcolorbutton.c (gtk_color_button_clicked):
Fix the handling of modality by copying what
GtkFileChooserButton does. (#342754, Yevgen Muntyan)
* gtk/gtkprintunixdialog.c (create_main_page): Make
the range entry insensitive if another range option
is selected. (#342783, Caolan McNamara)
......
......@@ -710,9 +710,14 @@ gtk_color_button_clicked (GtkButton *button)
color_dialog = GTK_COLOR_SELECTION_DIALOG (color_button->priv->cs_dialog);
if (parent)
gtk_window_set_transient_for (GTK_WINDOW (color_dialog),
GTK_WINDOW (parent));
if (GTK_WIDGET_TOPLEVEL (parent) && GTK_IS_WINDOW (parent))
{
if (GTK_WINDOW (parent) != gtk_window_get_transient_for (GTK_WINDOW (color_dialog)))
gtk_window_set_transient_for (GTK_WINDOW (color_dialog), GTK_WINDOW (parent));
gtk_window_set_modal (GTK_WINDOW (color_dialog),
gtk_window_get_modal (GTK_WINDOW (parent)));
}
g_signal_connect (color_dialog->ok_button, "clicked",
G_CALLBACK (dialog_ok_clicked), color_button);
......@@ -720,10 +725,6 @@ gtk_color_button_clicked (GtkButton *button)
G_CALLBACK (dialog_cancel_clicked), color_button);
g_signal_connect (color_dialog, "destroy",
G_CALLBACK (dialog_destroy), color_button);
/* If there is a grabbed window, set new dialog as modal */
if (gtk_grab_get_current ())
gtk_window_set_modal (GTK_WINDOW (color_button->priv->cs_dialog),TRUE);
}
color_dialog = GTK_COLOR_SELECTION_DIALOG (color_button->priv->cs_dialog);
......
......@@ -697,12 +697,14 @@ gtk_font_button_clicked (GtkButton *button)
font_dialog = GTK_FONT_SELECTION_DIALOG (font_button->priv->font_dialog);
if (parent)
gtk_window_set_transient_for (GTK_WINDOW (font_dialog), GTK_WINDOW (parent));
/* If there is a grabbed window, set new dialog as modal */
if (gtk_grab_get_current ())
gtk_window_set_modal (GTK_WINDOW (font_dialog), TRUE);
if (GTK_WIDGET_TOPLEVEL (parent) && GTK_IS_WINDOW (parent))
{
if (GTK_WINDOW (parent) != gtk_window_get_transient_for (GTK_WINDOW (font_dialog)))
gtk_window_set_transient_for (GTK_WINDOW (font_dialog), GTK_WINDOW (parent));
gtk_window_set_modal (GTK_WINDOW (font_dialog),
gtk_window_get_modal (GTK_WINDOW (parent)));
}
g_signal_connect (font_dialog->ok_button, "clicked",
G_CALLBACK (dialog_ok_clicked), font_button);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment