From cbd1435c88d83b46efad46ea5e1655736b502e41 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Mon, 15 Aug 2005 18:17:01 +0000 Subject: [PATCH] When using gtk_dialog_run() for modal dialogs, make sure to inherit the 2005-08-15 Matthias Clasen * gtk/gtkfilechooserdefault.c: When using gtk_dialog_run() for modal dialogs, make sure to inherit the window group from the parent, since we don't inherit window groups across transient parents currently. (#312918, Christian Persch) * gtk/gtkmessagedialog.c (gtk_message_dialog_new): * gtk/gtkdialog.c (gtk_dialog_run): Slight update to the docs. --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ gtk/gtkdialog.c | 6 +++--- gtk/gtkfilechooserdefault.c | 10 ++++++++++ gtk/gtkmessagedialog.c | 4 ++-- 6 files changed, 39 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index ca1f694f6..26d4c210b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2005-08-15 Matthias Clasen + * gtk/gtkfilechooserdefault.c: When using gtk_dialog_run() for + modal dialogs, make sure to inherit the window group from + the parent, since we don't inherit window groups across + transient parents currently. (#312918, Christian Persch) + + * gtk/gtkmessagedialog.c (gtk_message_dialog_new): + * gtk/gtkdialog.c (gtk_dialog_run): Slight update to the docs. + * gtk/gtkiconview.c (gtk_icon_view_select_path) (gtk_icon_view_scroll_to_path): Handle paths of depth 0 gracefully. (#312796, Jonathan Blandford) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index ca1f694f6..26d4c210b 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,13 @@ 2005-08-15 Matthias Clasen + * gtk/gtkfilechooserdefault.c: When using gtk_dialog_run() for + modal dialogs, make sure to inherit the window group from + the parent, since we don't inherit window groups across + transient parents currently. (#312918, Christian Persch) + + * gtk/gtkmessagedialog.c (gtk_message_dialog_new): + * gtk/gtkdialog.c (gtk_dialog_run): Slight update to the docs. + * gtk/gtkiconview.c (gtk_icon_view_select_path) (gtk_icon_view_scroll_to_path): Handle paths of depth 0 gracefully. (#312796, Jonathan Blandford) diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index ca1f694f6..26d4c210b 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,5 +1,13 @@ 2005-08-15 Matthias Clasen + * gtk/gtkfilechooserdefault.c: When using gtk_dialog_run() for + modal dialogs, make sure to inherit the window group from + the parent, since we don't inherit window groups across + transient parents currently. (#312918, Christian Persch) + + * gtk/gtkmessagedialog.c (gtk_message_dialog_new): + * gtk/gtkdialog.c (gtk_dialog_run): Slight update to the docs. + * gtk/gtkiconview.c (gtk_icon_view_select_path) (gtk_icon_view_scroll_to_path): Handle paths of depth 0 gracefully. (#312796, Jonathan Blandford) diff --git a/gtk/gtkdialog.c b/gtk/gtkdialog.c index 50a3871e6..21e463c13 100644 --- a/gtk/gtkdialog.c +++ b/gtk/gtkdialog.c @@ -962,9 +962,9 @@ run_destroy_handler (GtkDialog *dialog, gpointer data) * * Note that even though the recursive main loop gives the effect of a * modal dialog (it prevents the user from interacting with other - * windows while the dialog is run), callbacks such as timeouts, - * IO channel watches, DND drops, etc, will be - * triggered during a gtk_dialog_run() call. + * windows in the same window group while the dialog is run), callbacks + * such as timeouts, IO channel watches, DND drops, etc, will + * be triggered during a gtk_dialog_run() call. * * Return value: response ID **/ diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c index bd1b8c9fc..786a25195 100644 --- a/gtk/gtkfilechooserdefault.c +++ b/gtk/gtkfilechooserdefault.c @@ -936,6 +936,10 @@ error_message_with_parent (GtkWindow *parent, msg); gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", detail); + + if (parent->group) + gtk_window_group_add_window (parent->group, GTK_WINDOW (dialog)); + gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } @@ -6138,6 +6142,9 @@ confirm_dialog_should_accept_filename (GtkFileChooserDefault *impl, add_custom_button_to_dialog (GTK_DIALOG (dialog), _("_Replace"), GTK_STOCK_SAVE_AS, GTK_RESPONSE_ACCEPT); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT); + if (toplevel->group) + gtk_window_group_add_window (toplevel->group, GTK_WINDOW (dialog)); + response = gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); @@ -7237,6 +7244,9 @@ location_popup_handler (GtkFileChooserDefault *impl, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, accept_stock, GTK_RESPONSE_ACCEPT, NULL); + if (toplevel->group) + gtk_window_group_add_window (toplevel->group, GTK_WINDOW (dialog)); + gtk_window_set_default_size (GTK_WINDOW (dialog), 300, -1); gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 2); diff --git a/gtk/gtkmessagedialog.c b/gtk/gtkmessagedialog.c index 47a27f43d..483ad5fe0 100644 --- a/gtk/gtkmessagedialog.c +++ b/gtk/gtkmessagedialog.c @@ -372,11 +372,11 @@ gtk_message_dialog_font_size_change (GtkWidget *widget, /** * gtk_message_dialog_new: - * @parent: transient parent, or NULL for none + * @parent: transient parent, or %NULL for none * @flags: flags * @type: type of message * @buttons: set of buttons to use - * @message_format: printf()-style format string, or NULL + * @message_format: printf()-style format string, or %NULL * @Varargs: arguments for @message_format * * Creates a new message dialog, which is a simple dialog with an icon -- 2.43.2