[gimp] app: add the dialog buttons after creating the GimpColorDialog instance



commit 8251406b40be34e24a859e22ab3ff10b3440f67a
Author: Michael Natterer <mitch gimp org>
Date:   Thu May 30 11:48:10 2019 +0200

    app: add the dialog buttons after creating the GimpColorDialog instance
    
    so the "use-header-bar" property is set when the buttons are added,
    fixes the order of the "OK" and "Reset" buttons.

 app/widgets/gimpcolordialog.c | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)
---
diff --git a/app/widgets/gimpcolordialog.c b/app/widgets/gimpcolordialog.c
index 83d701f3f4..5c12f65549 100644
--- a/app/widgets/gimpcolordialog.c
+++ b/app/widgets/gimpcolordialog.c
@@ -150,20 +150,6 @@ gimp_color_dialog_class_init (GimpColorDialogClass *klass)
 static void
 gimp_color_dialog_init (GimpColorDialog *dialog)
 {
-  gimp_dialog_add_buttons (GIMP_DIALOG (dialog),
-
-                           _("_Reset"),  RESPONSE_RESET,
-                           _("_Cancel"), GTK_RESPONSE_CANCEL,
-                           _("_OK"),     GTK_RESPONSE_OK,
-
-                           NULL);
-
-  gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
-                                            RESPONSE_RESET,
-                                            GTK_RESPONSE_OK,
-                                            GTK_RESPONSE_CANCEL,
-                                            -1);
-
   dialog->stack = gtk_stack_new ();
   gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))),
                       dialog->stack, TRUE, TRUE, 0);
@@ -467,6 +453,20 @@ gimp_color_dialog_new (GimpViewable      *viewable,
                          "use-header-bar",     use_header_bar,
                          NULL);
 
+  gimp_dialog_add_buttons (GIMP_DIALOG (dialog),
+
+                           _("_Reset"),  RESPONSE_RESET,
+                           _("_Cancel"), GTK_RESPONSE_CANCEL,
+                           _("_OK"),     GTK_RESPONSE_OK,
+
+                           NULL);
+
+  gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
+                                            RESPONSE_RESET,
+                                            GTK_RESPONSE_OK,
+                                            GTK_RESPONSE_CANCEL,
+                                            -1);
+
   if (viewable)
     {
       gimp_viewable_dialog_set_viewable (GIMP_VIEWABLE_DIALOG (dialog),


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