Commit cbd1435c authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

When using gtk_dialog_run() for modal dialogs, make sure to inherit the

2005-08-15  Matthias Clasen  <mclasen@redhat.com>

	* 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.
parent f2f86e5d
2005-08-15 Matthias Clasen <mclasen@redhat.com>
* 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)
......
2005-08-15 Matthias Clasen <mclasen@redhat.com>
* 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)
......
2005-08-15 Matthias Clasen <mclasen@redhat.com>
* 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)
......
......@@ -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, <emphasis>will</emphasis> 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, <emphasis>will</emphasis>
* be triggered during a gtk_dialog_run() call.
*
* Return value: response ID
**/
......
......@@ -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);
......
......@@ -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
......
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