[gtk+] GtkColorChooserDialog: make alternative button order work



commit 2bc313c6246eca88b11d34830f2d00b99f0fd548
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Mar 20 22:38:36 2013 -0400

    GtkColorChooserDialog: make alternative button order work
    
    The alternative button order that we set did not actually
    work, since the ok button did not have a response id.
    Partial fix for
    https://bugzilla.gnome.org/show_bug.cgi?id=695493

 gtk/gtkcolorchooserdialog.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkcolorchooserdialog.c b/gtk/gtkcolorchooserdialog.c
index 2610354..fcde97f 100644
--- a/gtk/gtkcolorchooserdialog.c
+++ b/gtk/gtkcolorchooserdialog.c
@@ -96,7 +96,6 @@ selected_cb (GtkButton *button,
              GtkDialog *dialog)
 {
   save_color (GTK_COLOR_CHOOSER_DIALOG (dialog));
-  gtk_dialog_response (dialog, GTK_RESPONSE_OK);
 }
 
 static void
@@ -152,8 +151,7 @@ gtk_color_chooser_dialog_init (GtkColorChooserDialog *cc)
                     G_CALLBACK (selected_cb), dialog);
   gtk_widget_set_can_default (priv->select_button, TRUE);
   gtk_widget_show (priv->select_button);
-  gtk_box_pack_end (GTK_BOX (gtk_dialog_get_action_area (dialog)),
-                    priv->select_button, FALSE, TRUE, 0);
+  gtk_dialog_add_action_widget (dialog, priv->select_button, GTK_RESPONSE_OK);
   gtk_widget_grab_default (priv->select_button);
 
   gtk_dialog_set_alternative_button_order (dialog,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]