[gimp] app: use the new combo box label in many tool options



commit a5d2123adf316da0f6528bfc7be526df34775620
Author: Michael Natterer <mitch gimp org>
Date:   Mon Jun 3 16:40:24 2013 +0200

    app: use the new combo box label in many tool options
    
    and generally clean up a bit. Reuse the clone options code in the
    perspective clone options. Addresses bug #122862.

 app/tools/Makefile.am                |    2 +
 app/tools/gimpalignoptions.c         |   11 +---
 app/tools/gimpblendoptions.c         |   19 ++----
 app/tools/gimpbucketfilloptions.c    |   12 +---
 app/tools/gimpcloneoptions-gui.c     |  107 ++++++++++++++++++++++++++++++++++
 app/tools/gimpcloneoptions-gui.h     |   25 ++++++++
 app/tools/gimpclonetool.c            |   52 +----------------
 app/tools/gimpgegltool.c             |    2 +-
 app/tools/gimphealtool.c             |   13 +----
 app/tools/gimppaintoptions-gui.c     |   26 +-------
 app/tools/gimpperspectiveclonetool.c |   45 +-------------
 app/tools/gimprectangleoptions.c     |    4 +-
 app/tools/gimpregionselectoptions.c  |   13 +----
 app/tools/gimptransformoptions.c     |   26 +++------
 14 files changed, 168 insertions(+), 189 deletions(-)
---
diff --git a/app/tools/Makefile.am b/app/tools/Makefile.am
index 176749f..4c0b624 100644
--- a/app/tools/Makefile.am
+++ b/app/tools/Makefile.am
@@ -46,6 +46,8 @@ libapptools_a_sources = \
        gimpcageoptions.h               \
        gimpcagetool.c                  \
        gimpcagetool.h                  \
+       gimpcloneoptions-gui.c          \
+       gimpcloneoptions-gui.h          \
        gimpclonetool.c                 \
        gimpclonetool.h                 \
        gimpcoloroptions.c              \
diff --git a/app/tools/gimpalignoptions.c b/app/tools/gimpalignoptions.c
index be1e250..6cd792f 100644
--- a/app/tools/gimpalignoptions.c
+++ b/app/tools/gimpalignoptions.c
@@ -278,16 +278,9 @@ gimp_align_options_gui (GimpToolOptions *tool_options)
   gtk_container_add (GTK_CONTAINER (frame), align_vbox);
   gtk_widget_show (align_vbox);
 
-  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
-  gtk_box_pack_start (GTK_BOX (align_vbox), hbox, FALSE, FALSE, 0);
-  gtk_widget_show (hbox);
-
-  frame = gimp_frame_new (_("Relative to:"));
-  gtk_box_pack_start (GTK_BOX (align_vbox), frame, FALSE, FALSE, 0);
-  gtk_widget_show (frame);
-
   combo = gimp_prop_enum_combo_box_new (config, "align-reference", 0, 0);
-  gtk_container_add (GTK_CONTAINER (frame), combo);
+  gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Relative to"));
+  gtk_box_pack_start (GTK_BOX (align_vbox), combo, FALSE, FALSE, 0);
   gtk_widget_show (combo);
 
   hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
diff --git a/app/tools/gimpblendoptions.c b/app/tools/gimpblendoptions.c
index eac257d..a773b3b 100644
--- a/app/tools/gimpblendoptions.c
+++ b/app/tools/gimpblendoptions.c
@@ -200,7 +200,6 @@ gimp_blend_options_gui (GimpToolOptions *tool_options)
 {
   GObject   *config = G_OBJECT (tool_options);
   GtkWidget *vbox   = gimp_paint_options_gui (tool_options);
-  GtkWidget *table;
   GtkWidget *vbox2;
   GtkWidget *frame;
   GtkWidget *scale;
@@ -217,27 +216,21 @@ gimp_blend_options_gui (GimpToolOptions *tool_options)
   gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
   gtk_widget_show (button);
 
-  table = gtk_table_new (3, 2, FALSE);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 2);
-  gtk_table_set_row_spacings (GTK_TABLE (table), 2);
-  gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
-  gtk_widget_show (table);
-
   /*  the gradient type menu  */
   combo = gimp_prop_enum_combo_box_new (config, "gradient-type", 0, 0);
+  gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Shape"));
   g_object_set (combo, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
   gimp_enum_combo_box_set_stock_prefix (GIMP_ENUM_COMBO_BOX (combo),
                                         "gimp-gradient");
-  gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
-                             _("Shape:"), 0.0, 0.5,
-                             combo, 2, FALSE);
+  gtk_box_pack_start (GTK_BOX (vbox), combo, FALSE, FALSE, 0);
+  gtk_widget_show (combo);
 
   /*  the repeat option  */
   combo = gimp_prop_enum_combo_box_new (config, "gradient-repeat", 0, 0);
+  gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Repeat"));
   g_object_set (combo, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
-  gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
-                             _("Repeat:"), 0.0, 0.5,
-                             combo, 2, FALSE);
+  gtk_box_pack_start (GTK_BOX (vbox), combo, FALSE, FALSE, 0);
+  gtk_widget_show (combo);
 
   g_signal_connect (config, "notify::gradient-type",
                     G_CALLBACK (blend_options_gradient_type_notify),
diff --git a/app/tools/gimpbucketfilloptions.c b/app/tools/gimpbucketfilloptions.c
index f986d81..1dfb776 100644
--- a/app/tools/gimpbucketfilloptions.c
+++ b/app/tools/gimpbucketfilloptions.c
@@ -215,7 +215,6 @@ gimp_bucket_fill_options_gui (GimpToolOptions *tool_options)
   GObject         *config = G_OBJECT (tool_options);
   GtkWidget       *vbox   = gimp_paint_options_gui (tool_options);
   GtkWidget       *vbox2;
-  GtkWidget       *table;
   GtkWidget       *frame;
   GtkWidget       *hbox;
   GtkWidget       *button;
@@ -289,15 +288,10 @@ gimp_bucket_fill_options_gui (GimpToolOptions *tool_options)
   gtk_widget_show (scale);
 
   /*  the fill criterion combo  */
-  table = gtk_table_new (2, 3, FALSE);
-  gtk_table_set_col_spacings (GTK_TABLE (table), 2);
-  gtk_box_pack_start (GTK_BOX (vbox2), table, FALSE, FALSE, 0);
-  gtk_widget_show (table);
-
   combo = gimp_prop_enum_combo_box_new (config, "fill-criterion", 0, 0);
-  gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
-                             _("Fill by:"), 0.0, 0.5,
-                             combo, 2, FALSE);
+  gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Fill by"));
+  gtk_box_pack_start (GTK_BOX (vbox2), combo, FALSE, FALSE, 0);
+  gtk_widget_show (combo);
 
   return vbox;
 }
diff --git a/app/tools/gimpcloneoptions-gui.c b/app/tools/gimpcloneoptions-gui.c
new file mode 100644
index 0000000..a499c42
--- /dev/null
+++ b/app/tools/gimpcloneoptions-gui.c
@@ -0,0 +1,107 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "config.h"
+
+#include <gegl.h>
+#include <gtk/gtk.h>
+
+#include "libgimpwidgets/gimpwidgets.h"
+
+#include "tools-types.h"
+
+#include "paint/gimpcloneoptions.h"
+
+#include "widgets/gimpviewablebox.h"
+#include "widgets/gimpwidgets-utils.h"
+
+#include "gimpcloneoptions-gui.h"
+#include "gimppaintoptions-gui.h"
+
+#include "gimp-intl.h"
+
+
+static gboolean
+gimp_clone_options_sync_source (GBinding     *binding,
+                                const GValue *source_value,
+                                GValue       *target_value,
+                                gpointer      user_data)
+{
+  GimpCloneType type = g_value_get_enum (source_value);
+
+  g_value_set_boolean (target_value,
+                       type == GPOINTER_TO_INT (user_data));
+
+  return TRUE;
+}
+
+GtkWidget *
+gimp_clone_options_gui (GimpToolOptions *tool_options)
+{
+  GObject   *config = G_OBJECT (tool_options);
+  GtkWidget *vbox   = gimp_paint_options_gui (tool_options);
+  GtkWidget *frame;
+  GtkWidget *combo;
+  GtkWidget *source_vbox;
+  GtkWidget *button;
+  GtkWidget *hbox;
+
+  /*  the source frame  */
+  frame = gimp_frame_new (NULL);
+  gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
+  gtk_widget_show (frame);
+
+  /*  the source type menu  */
+  combo = gimp_prop_enum_combo_box_new (config, "clone-type", 0, 0);
+  gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Source"));
+  gtk_frame_set_label_widget (GTK_FRAME (frame), combo);
+  gtk_widget_show (combo);
+
+  source_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+  gtk_container_add (GTK_CONTAINER (frame), source_vbox);
+  gtk_widget_show (source_vbox);
+
+  button = gimp_prop_check_button_new (config, "sample-merged",
+                                       _("Sample merged"));
+  gtk_box_pack_start (GTK_BOX (source_vbox), button, FALSE, FALSE, 0);
+
+  g_object_bind_property_full (config, "clone-type",
+                               button, "visible",
+                               G_BINDING_SYNC_CREATE,
+                               gimp_clone_options_sync_source,
+                               NULL,
+                               GINT_TO_POINTER (GIMP_IMAGE_CLONE), NULL);
+
+  hbox = gimp_prop_pattern_box_new (NULL, GIMP_CONTEXT (tool_options),
+                                    NULL, 2,
+                                    "pattern-view-type", "pattern-view-size");
+  gtk_box_pack_start (GTK_BOX (source_vbox), hbox, FALSE, FALSE, 0);
+
+  g_object_bind_property_full (config, "clone-type",
+                               hbox,   "visible",
+                               G_BINDING_SYNC_CREATE,
+                               gimp_clone_options_sync_source,
+                               NULL,
+                               GINT_TO_POINTER (GIMP_PATTERN_CLONE), NULL);
+
+  combo = gimp_prop_enum_combo_box_new (config, "align-mode", 0, 0);
+  gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Alignment"));
+  gtk_box_pack_start (GTK_BOX (vbox), combo, TRUE, TRUE, 0);
+  gtk_widget_show (combo);
+
+  return vbox;
+}
diff --git a/app/tools/gimpcloneoptions-gui.h b/app/tools/gimpcloneoptions-gui.h
new file mode 100644
index 0000000..d2bfc1c
--- /dev/null
+++ b/app/tools/gimpcloneoptions-gui.h
@@ -0,0 +1,25 @@
+/* GIMP - The GNU Image Manipulation Program
+ * Copyright (C) 1995 Spencer Kimball and Peter Mattis
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef __GIMP_CLONE_OPTIONS_GUI_H__
+#define __GIMP_CLONE_OPTIONS_GUI_H__
+
+
+GtkWidget * gimp_clone_options_gui (GimpToolOptions *tool_options);
+
+
+#endif  /*  __GIMP_CLONE_OPTIONS_GUI_H__  */
diff --git a/app/tools/gimpclonetool.c b/app/tools/gimpclonetool.c
index 325b4c4..1e51d13 100644
--- a/app/tools/gimpclonetool.c
+++ b/app/tools/gimpclonetool.c
@@ -28,21 +28,16 @@
 #include "paint/gimpcloneoptions.h"
 
 #include "widgets/gimphelp-ids.h"
-#include "widgets/gimpviewablebox.h"
-#include "widgets/gimpwidgets-utils.h"
 
 #include "display/gimpdisplay.h"
 
 #include "gimpclonetool.h"
-#include "gimppaintoptions-gui.h"
+#include "gimpcloneoptions-gui.h"
 #include "gimptoolcontrol.h"
 
 #include "gimp-intl.h"
 
 
-static GtkWidget * gimp_clone_options_gui (GimpToolOptions *tool_options);
-
-
 G_DEFINE_TYPE (GimpCloneTool, gimp_clone_tool, GIMP_TYPE_SOURCE_TOOL)
 
 #define parent_class gimp_clone_tool_parent_class
@@ -91,48 +86,3 @@ gimp_clone_tool_init (GimpCloneTool *clone)
   source_tool->status_set_source      = _("Click to set a new clone source");
   source_tool->status_set_source_ctrl = _("%s to set a new clone source");
 }
-
-
-/*  tool options stuff  */
-
-static GtkWidget *
-gimp_clone_options_gui (GimpToolOptions *tool_options)
-{
-  GObject   *config = G_OBJECT (tool_options);
-  GtkWidget *vbox   = gimp_paint_options_gui (tool_options);
-  GtkWidget *frame;
-  GtkWidget *button;
-  GtkWidget *hbox;
-  GtkWidget *combo;
-  GtkWidget *label;
-
-  frame = gimp_prop_enum_radio_frame_new (config, "clone-type",
-                                          _("Source"), 0, 0);
-  gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
-  gtk_widget_show (frame);
-
-  button = gimp_prop_check_button_new (config, "sample-merged",
-                                       _("Sample merged"));
-  gimp_enum_radio_frame_add (GTK_FRAME (frame), button,
-                             GIMP_IMAGE_CLONE, TRUE);
-
-  hbox = gimp_prop_pattern_box_new (NULL, GIMP_CONTEXT (tool_options),
-                                    NULL, 2,
-                                    "pattern-view-type", "pattern-view-size");
-  gimp_enum_radio_frame_add (GTK_FRAME (frame), hbox,
-                             GIMP_PATTERN_CLONE, TRUE);
-
-  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
-  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
-  gtk_widget_show (hbox);
-
-  label = gtk_label_new (_("Alignment:"));
-  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-  gtk_widget_show (label);
-
-  combo = gimp_prop_enum_combo_box_new (config, "align-mode", 0, 0);
-  gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
-  gtk_widget_show (combo);
-
-  return vbox;
-}
diff --git a/app/tools/gimpgegltool.c b/app/tools/gimpgegltool.c
index f8a3081..28c468b 100644
--- a/app/tools/gimpgegltool.c
+++ b/app/tools/gimpgegltool.c
@@ -159,7 +159,7 @@ gimp_gegl_tool_operation_blacklisted (const gchar *name,
     "gegl:whirl-pinch",
 
     /* these ops are blacklisted for other reasons */
-    "gegl:contrast-curve",
+    //"gegl:contrast-curve",
     "gegl:convert-format", /* pointless */
     "gegl:display", /* pointless */
     "gegl:fill-path",
diff --git a/app/tools/gimphealtool.c b/app/tools/gimphealtool.c
index be13b7f..54c5d60 100644
--- a/app/tools/gimphealtool.c
+++ b/app/tools/gimphealtool.c
@@ -92,8 +92,6 @@ gimp_heal_options_gui (GimpToolOptions *tool_options)
   GObject   *config = G_OBJECT (tool_options);
   GtkWidget *vbox   = gimp_paint_options_gui (tool_options);
   GtkWidget *button;
-  GtkWidget *hbox;
-  GtkWidget *label;
   GtkWidget *combo;
 
   /* the sample merged checkbox */
@@ -103,16 +101,9 @@ gimp_heal_options_gui (GimpToolOptions *tool_options)
   gtk_widget_show (button);
 
   /* the alignment combo */
-  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
-  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
-  gtk_widget_show (hbox);
-
-  label = gtk_label_new (_("Alignment:"));
-  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-  gtk_widget_show (label);
-
   combo = gimp_prop_enum_combo_box_new (config, "align-mode", 0, 0);
-  gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
+  gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Alignment"));
+  gtk_box_pack_start (GTK_BOX (vbox), combo, TRUE, TRUE, 0);
   gtk_widget_show (combo);
 
   return vbox;
diff --git a/app/tools/gimppaintoptions-gui.c b/app/tools/gimppaintoptions-gui.c
index 458ca47..d4e7a44 100644
--- a/app/tools/gimppaintoptions-gui.c
+++ b/app/tools/gimppaintoptions-gui.c
@@ -76,25 +76,16 @@ gimp_paint_options_gui (GimpToolOptions *tool_options)
   GObject          *config  = G_OBJECT (tool_options);
   GimpPaintOptions *options = GIMP_PAINT_OPTIONS (tool_options);
   GtkWidget        *vbox    = gimp_tool_options_gui (tool_options);
-  GtkWidget        *hbox;
   GtkWidget        *menu;
-  GtkWidget        *label;
   GtkWidget        *scale;
   GType             tool_type;
 
   tool_type = tool_options->tool_info->tool_type;
 
   /*  the paint mode menu  */
-  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
-  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
-  gtk_widget_show (hbox);
-
-  label = gtk_label_new (_("Mode:"));
-  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-  gtk_widget_show (label);
-
   menu = gimp_prop_paint_mode_menu_new (config, "paint-mode", TRUE, FALSE);
-  gtk_box_pack_start (GTK_BOX (hbox), menu, TRUE, TRUE, 0);
+  gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (menu), _("Mode"));
+  gtk_box_pack_start (GTK_BOX (vbox), menu, FALSE, FALSE, 0);
   gtk_widget_show (menu);
 
   if (tool_type == GIMP_TYPE_ERASER_TOOL     ||
@@ -103,7 +94,6 @@ gimp_paint_options_gui (GimpToolOptions *tool_options)
       tool_type == GIMP_TYPE_SMUDGE_TOOL)
     {
       gtk_widget_set_sensitive (menu, FALSE);
-      gtk_widget_set_sensitive (label, FALSE);
     }
 
   /*  the opacity scale  */
@@ -283,7 +273,6 @@ dynamics_options_gui (GimpPaintOptions *paint_options,
   GObject   *config = G_OBJECT (paint_options);
   GtkWidget *frame;
   GtkWidget *inner_frame;
-  GtkWidget *label;
   GtkWidget *scale;
   GtkWidget *menu;
   GtkWidget *combo;
@@ -330,16 +319,9 @@ dynamics_options_gui (GimpPaintOptions *paint_options,
 #endif
 
   /*  the repeat type  */
-  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
-  gtk_box_pack_start (GTK_BOX (inner_vbox), hbox, FALSE, FALSE, 0);
-  gtk_widget_show (hbox);
-
-  label = gtk_label_new (_("Repeat:"));
-  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-  gtk_widget_show (label);
-
   combo = gimp_prop_enum_combo_box_new (config, "fade-repeat", 0, 0);
-  gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
+  gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Repeat"));
+  gtk_box_pack_start (GTK_BOX (inner_vbox), combo, TRUE, TRUE, 0);
   gtk_widget_show (combo);
 
   checkbox = gimp_prop_check_button_new (config, "fade-reverse",
diff --git a/app/tools/gimpperspectiveclonetool.c b/app/tools/gimpperspectiveclonetool.c
index 0f35b3e..5485413 100644
--- a/app/tools/gimpperspectiveclonetool.c
+++ b/app/tools/gimpperspectiveclonetool.c
@@ -39,7 +39,7 @@
 #include "display/gimpdisplay.h"
 
 #include "gimpperspectiveclonetool.h"
-#include "gimppaintoptions-gui.h"
+#include "gimpcloneoptions-gui.h"
 #include "gimptoolcontrol.h"
 
 #include "gimp-intl.h"
@@ -869,53 +869,14 @@ static GtkWidget *
 gimp_perspective_clone_options_gui (GimpToolOptions *tool_options)
 {
   GObject   *config = G_OBJECT (tool_options);
-  GtkWidget *vbox;
-  GtkWidget *paint_options;
-  GtkWidget *frame;
+  GtkWidget *vbox   = gimp_clone_options_gui (tool_options);
   GtkWidget *mode;
-  GtkWidget *button;
-  GtkWidget *hbox;
-  GtkWidget *label;
-  GtkWidget *combo;
-
-  vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
-  paint_options = gimp_paint_options_gui (tool_options);
 
   /* radio buttons to set if you are modifying perspe plane or painting */
   mode = gimp_prop_enum_radio_box_new (config, "clone-mode", 0, 0);
   gtk_box_pack_start (GTK_BOX (vbox), mode, FALSE, FALSE, 0);
+  gtk_box_reorder_child (GTK_BOX (vbox), mode, 0);
   gtk_widget_show (mode);
 
-  gtk_box_pack_start (GTK_BOX (vbox), paint_options, FALSE, FALSE, 0);
-  gtk_widget_show (paint_options);
-
-  frame = gimp_prop_enum_radio_frame_new (config, "clone-type",
-                                          _("Source"), 0, 0);
-  gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
-  gtk_widget_show (frame);
-
-  button = gimp_prop_check_button_new (config, "sample-merged",
-                                       _("Sample merged"));
-  gimp_enum_radio_frame_add (GTK_FRAME (frame), button,
-                             GIMP_IMAGE_CLONE, TRUE);
-
-  hbox = gimp_prop_pattern_box_new (NULL, GIMP_CONTEXT (tool_options),
-                                    NULL, 2,
-                                    "pattern-view-type", "pattern-view-size");
-  gimp_enum_radio_frame_add (GTK_FRAME (frame), hbox,
-                             GIMP_PATTERN_CLONE, TRUE);
-
-  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
-  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
-  gtk_widget_show (hbox);
-
-  label = gtk_label_new (_("Alignment:"));
-  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-  gtk_widget_show (label);
-
-  combo = gimp_prop_enum_combo_box_new (config, "align-mode", 0, 0);
-  gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
-  gtk_widget_show (combo);
-
   return vbox;
 }
diff --git a/app/tools/gimprectangleoptions.c b/app/tools/gimprectangleoptions.c
index 39bc351..8404622 100644
--- a/app/tools/gimprectangleoptions.c
+++ b/app/tools/gimprectangleoptions.c
@@ -859,8 +859,7 @@ gimp_rectangle_options_gui (GimpToolOptions *tool_options)
     gtk_frame_set_label_widget (GTK_FRAME (frame), hbox);
     gtk_widget_show (hbox);
 
-    button = gimp_prop_check_button_new (config, "fixed-rule-active",
-                                         _("Fixed:"));
+    button = gimp_prop_check_button_new (config, "fixed-rule-active", NULL);
     gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, TRUE, 0);
     gtk_widget_show (button);
 
@@ -869,6 +868,7 @@ gimp_rectangle_options_gui (GimpToolOptions *tool_options)
                       private);
 
     combo = gimp_prop_enum_combo_box_new (config, "fixed-rule", 0, 0);
+    gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Fixed"));
     gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
     gtk_widget_show (combo);
 
diff --git a/app/tools/gimpregionselectoptions.c b/app/tools/gimpregionselectoptions.c
index e95451d..be8713e 100644
--- a/app/tools/gimpregionselectoptions.c
+++ b/app/tools/gimpregionselectoptions.c
@@ -196,8 +196,6 @@ gimp_region_select_options_gui (GimpToolOptions *tool_options)
   GtkWidget *vbox    = gimp_selection_options_gui (tool_options);
   GtkWidget *button;
   GtkWidget *scale;
-  GtkWidget *hbox;
-  GtkWidget *label;
   GtkWidget *combo;
 
   /*  the select transparent areas toggle  */
@@ -220,16 +218,9 @@ gimp_region_select_options_gui (GimpToolOptions *tool_options)
   gtk_widget_show (scale);
 
   /*  the select criterion combo  */
-  hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
-  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
-  gtk_widget_show (hbox);
-
-  label = gtk_label_new (_("Select by:"));
-  gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
-  gtk_widget_show (label);
-
   combo = gimp_prop_enum_combo_box_new (config, "select-criterion", 0, 0);
-  gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
+  gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Select by"));
+  gtk_box_pack_start (GTK_BOX (vbox), combo, TRUE, TRUE, 0);
   gtk_widget_show (combo);
 
   return vbox;
diff --git a/app/tools/gimptransformoptions.c b/app/tools/gimptransformoptions.c
index a3fb967..5f61f3c 100644
--- a/app/tools/gimptransformoptions.c
+++ b/app/tools/gimptransformoptions.c
@@ -398,21 +398,15 @@ gimp_transform_options_gui (GimpToolOptions *tool_options)
   gtk_widget_show (frame);
 
   /*  the interpolation menu  */
-  frame = gimp_frame_new (_("Interpolation:"));
-  gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
-  gtk_widget_show (frame);
-
   combo = gimp_prop_enum_combo_box_new (config, "interpolation", 0, 0);
-  gtk_container_add (GTK_CONTAINER (frame), combo);
+  gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Interpolation"));
+  gtk_box_pack_start (GTK_BOX (vbox), combo, FALSE, FALSE, 0);
   gtk_widget_show (combo);
 
   /*  the clipping menu  */
-  frame = gimp_frame_new (_("Clipping:"));
-  gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
-  gtk_widget_show (frame);
-
   combo = gimp_prop_enum_combo_box_new (config, "clip", 0, 0);
-  gtk_container_add (GTK_CONTAINER (frame), combo);
+  gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Clipping"));
+  gtk_box_pack_start (GTK_BOX (vbox), combo, FALSE, FALSE, 0);
   gtk_widget_show (combo);
 
   /*  the preview frame  */
@@ -425,24 +419,20 @@ gimp_transform_options_gui (GimpToolOptions *tool_options)
   gtk_widget_show (frame);
 
   /*  the guides frame  */
-  frame = gimp_frame_new (_("Guides"));
+  frame = gimp_frame_new (NULL);
   gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
   gtk_widget_show (frame);
 
-  grid_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
-  gtk_container_add (GTK_CONTAINER (frame), grid_box);
-  gtk_widget_show (grid_box);
-
   /*  the guides type menu  */
   combo = gimp_prop_enum_combo_box_new (config, "grid-type", 0, 0);
-  gtk_box_pack_start (GTK_BOX (grid_box), combo, FALSE, FALSE, 0);
+  gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Guides"));
+  gtk_frame_set_label_widget (GTK_FRAME (frame), combo);
   gtk_widget_show (combo);
 
   /*  the grid density scale  */
   scale = gimp_prop_spin_scale_new (config, "grid-size", NULL,
                                     1.8, 8.0, 0);
-  gtk_box_pack_start (GTK_BOX (grid_box), scale, FALSE, FALSE, 0);
-  gtk_widget_show (scale);
+  gtk_container_add (GTK_CONTAINER (frame), scale);
 
   g_object_bind_property_full (config, "grid-type",
                                scale,  "visible",


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