]> Pileus Git - ~andy/gtk/commitdiff
When using gtk_dialog_run() for modal dialogs, make sure to inherit the
authorMatthias Clasen <mclasen@redhat.com>
Mon, 15 Aug 2005 18:17:01 +0000 (18:17 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 15 Aug 2005 18:17:01 +0000 (18:17 +0000)
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.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gtk/gtkdialog.c
gtk/gtkfilechooserdefault.c
gtk/gtkmessagedialog.c

index ca1f694f65a2156f405f834ae2687cde4561660b..26d4c210b337724dae2d7d2c93cea92e8d076f26 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 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)
index ca1f694f65a2156f405f834ae2687cde4561660b..26d4c210b337724dae2d7d2c93cea92e8d076f26 100644 (file)
@@ -1,5 +1,13 @@
 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)
index ca1f694f65a2156f405f834ae2687cde4561660b..26d4c210b337724dae2d7d2c93cea92e8d076f26 100644 (file)
@@ -1,5 +1,13 @@
 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)
index 50a3871e68d47334f23cbc9f6e4ba8b3d41c359e..21e463c13d2a8d34bc26cc5c4f414195b41f0c92 100644 (file)
@@ -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
  **/
index bd1b8c9fc8c91123b438d575614c76d4e6756eda..786a2519526f10b513f055210f787e54c6d7b6b7 100644 (file)
@@ -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);
index 47a27f43d9d6454a5fe8c7cffd24cf5d47f37909..483ad5fe0619c3d38fb573f675c6e49179bc8296 100644 (file)
@@ -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