mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 13:11:13 +00:00
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)
This commit is contained in:
parent
d6f2aadab7
commit
685d8ecfce
@ -1,5 +1,10 @@
|
||||
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)
|
||||
|
@ -1,5 +1,10 @@
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user