[gimp/gtk3-port: 394/440] app: fix button order in GimpColorDialog



commit 4cc1400aab5abe224611c909d01064eb52e89ee3
Author: Michael Natterer <mitch gimp org>
Date:   Thu May 10 18:25:13 2018 +0200

    app: fix button order in GimpColorDialog

 app/widgets/gimpcolordialog.c |   44 ++++++++++++++++++++--------------------
 1 files changed, 22 insertions(+), 22 deletions(-)
---
diff --git a/app/widgets/gimpcolordialog.c b/app/widgets/gimpcolordialog.c
index 9beff53..a99e399 100644
--- a/app/widgets/gimpcolordialog.c
+++ b/app/widgets/gimpcolordialog.c
@@ -73,6 +73,7 @@ static void   gimp_color_dialog_history_selected (GimpColorHistory   *history,
                                                   const GimpRGB      *rgb,
                                                   GimpColorDialog    *dialog);
 
+
 G_DEFINE_TYPE (GimpColorDialog, gimp_color_dialog, GIMP_TYPE_VIEWABLE_DIALOG)
 
 #define parent_class gimp_color_dialog_parent_class
@@ -105,21 +106,32 @@ gimp_color_dialog_class_init (GimpColorDialogClass *klass)
 static void
 gimp_color_dialog_init (GimpColorDialog *dialog)
 {
-  gtk_dialog_add_buttons (GTK_DIALOG (dialog),
+}
+
+static void
+gimp_color_dialog_constructed (GObject *object)
+{
+  GimpColorDialog    *dialog          = GIMP_COLOR_DIALOG (object);
+  GimpViewableDialog *viewable_dialog = GIMP_VIEWABLE_DIALOG (object);
+  GtkWidget          *hbox;
+  GtkWidget          *history;
+  GtkWidget          *button;
+
+  G_OBJECT_CLASS (parent_class)->constructed (object);
 
-                          _("_Reset"),  RESPONSE_RESET,
-                          _("_Cancel"), GTK_RESPONSE_CANCEL,
-                          _("_OK"),     GTK_RESPONSE_OK,
+  gimp_dialog_add_buttons (GIMP_DIALOG (dialog),
 
-                          NULL);
+                           _("_Reset"),  RESPONSE_RESET,
+                           _("_Cancel"), GTK_RESPONSE_CANCEL,
+                           _("_OK"),     GTK_RESPONSE_OK,
 
-  gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+                           NULL);
 
   gimp_dialog_set_alternative_button_order (GTK_DIALOG (dialog),
-                                           RESPONSE_RESET,
-                                           GTK_RESPONSE_OK,
-                                           GTK_RESPONSE_CANCEL,
-                                           -1);
+                                            RESPONSE_RESET,
+                                            GTK_RESPONSE_OK,
+                                            GTK_RESPONSE_CANCEL,
+                                            -1);
 
   dialog->selection = gimp_color_selection_new ();
   gtk_container_set_border_width (GTK_CONTAINER (dialog->selection), 12);
@@ -130,18 +142,6 @@ gimp_color_dialog_init (GimpColorDialog *dialog)
   g_signal_connect (dialog->selection, "color-changed",
                     G_CALLBACK (gimp_color_dialog_color_changed),
                     dialog);
-}
-
-static void
-gimp_color_dialog_constructed (GObject *object)
-{
-  GimpColorDialog    *dialog          = GIMP_COLOR_DIALOG (object);
-  GimpViewableDialog *viewable_dialog = GIMP_VIEWABLE_DIALOG (object);
-  GtkWidget          *hbox;
-  GtkWidget          *history;
-  GtkWidget          *button;
-
-  G_OBJECT_CLASS (parent_class)->constructed (object);
 
   /* Color history box. */
   hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);


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