gimp r25884 - in trunk: . app/tools app/widgets



Author: neo
Date: Tue Jun  3 10:51:04 2008
New Revision: 25884
URL: http://svn.gnome.org/viewvc/gimp?rev=25884&view=rev

Log:
2008-06-03  Sven Neumann  <sven gimp org>

	* app/widgets/widgets-enums.[ch]: changed descriptions for
	GimpHistogramScale enum.

	* app/tools/gimpimagemaptool.[ch]

	* app/tools/gimpimagemaptool-settings.c: added a GtkSizeGroup for
	aligning with the "Presets" label. Added an accessor for the
	dialog's vbox.

	* app/tools/gimpbrightnesscontrasttool.c
	* app/tools/gimpcolorbalancetool.c
	* app/tools/gimpcolorizetool.c
	* app/tools/gimpcurvestool.c
	* app/tools/gimpdesaturatetool.c
	* app/tools/gimpgegltool.c
	* app/tools/gimphuesaturationtool.c
	* app/tools/gimplevelstool.c
	* app/tools/gimpposterizetool.c
	* app/tools/gimpthresholdtool.c: use the new accessor. Minor
	dialog cleanups in a few places.


Modified:
   trunk/ChangeLog
   trunk/app/tools/gimpbrightnesscontrasttool.c
   trunk/app/tools/gimpcolorbalancetool.c
   trunk/app/tools/gimpcolorizetool.c
   trunk/app/tools/gimpcurvestool.c
   trunk/app/tools/gimpdesaturatetool.c
   trunk/app/tools/gimpgegltool.c
   trunk/app/tools/gimphuesaturationtool.c
   trunk/app/tools/gimpimagemaptool-settings.c
   trunk/app/tools/gimpimagemaptool.c
   trunk/app/tools/gimpimagemaptool.h
   trunk/app/tools/gimplevelstool.c
   trunk/app/tools/gimpposterizetool.c
   trunk/app/tools/gimpthresholdtool.c
   trunk/app/widgets/widgets-enums.c
   trunk/app/widgets/widgets-enums.h

Modified: trunk/app/tools/gimpbrightnesscontrasttool.c
==============================================================================
--- trunk/app/tools/gimpbrightnesscontrasttool.c	(original)
+++ trunk/app/tools/gimpbrightnesscontrasttool.c	Tue Jun  3 10:51:04 2008
@@ -293,21 +293,26 @@
 /********************************/
 
 static void
-gimp_brightness_contrast_tool_dialog (GimpImageMapTool *im_tool)
+gimp_brightness_contrast_tool_dialog (GimpImageMapTool *image_map_tool)
 {
-  GimpBrightnessContrastTool   *bc_tool = GIMP_BRIGHTNESS_CONTRAST_TOOL (im_tool);
-  GimpBrightnessContrastConfig *config  = bc_tool->config;
+  GimpBrightnessContrastTool   *bc_tool;
+  GimpBrightnessContrastConfig *config;
+  GtkWidget                    *main_vbox;
   GtkWidget                    *table;
   GtkWidget                    *slider;
   GtkWidget                    *button;
   GtkObject                    *data;
 
+  bc_tool = GIMP_BRIGHTNESS_CONTRAST_TOOL (image_map_tool);
+  config  = bc_tool->config;
+
+  main_vbox = gimp_image_map_tool_dialog_get_vbox (image_map_tool);
+
   /*  The table containing sliders  */
   table = gtk_table_new (2, 3, FALSE);
   gtk_table_set_col_spacings (GTK_TABLE (table), 4);
   gtk_table_set_row_spacings (GTK_TABLE (table), 2);
-  gtk_box_pack_start (GTK_BOX (im_tool->main_vbox), table,
-                      FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (main_vbox), table, FALSE, FALSE, 0);
   gtk_widget_show (table);
 
   /*  Create the brightness scale widget  */
@@ -342,8 +347,7 @@
 
   button = gimp_stock_button_new (GIMP_STOCK_TOOL_LEVELS,
                                   _("Edit these Settings as Levels"));
-  gtk_box_pack_start (GTK_BOX (im_tool->main_vbox), button,
-                      FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (main_vbox), button, FALSE, FALSE, 0);
   gtk_widget_show (button);
 
   g_signal_connect (button, "clicked",
@@ -356,7 +360,9 @@
                                    GParamSpec                 *pspec,
                                    GimpBrightnessContrastTool *bc_tool)
 {
-  GimpBrightnessContrastConfig *config = GIMP_BRIGHTNESS_CONTRAST_CONFIG (object);
+  GimpBrightnessContrastConfig *config;
+
+  config = GIMP_BRIGHTNESS_CONTRAST_CONFIG (object);
 
   if (! bc_tool->brightness_data)
     return;

Modified: trunk/app/tools/gimpcolorbalancetool.c
==============================================================================
--- trunk/app/tools/gimpcolorbalancetool.c	(original)
+++ trunk/app/tools/gimpcolorbalancetool.c	Tue Jun  3 10:51:04 2008
@@ -253,16 +253,19 @@
 }
 
 static void
-gimp_color_balance_tool_dialog (GimpImageMapTool *im_tool)
+gimp_color_balance_tool_dialog (GimpImageMapTool *image_map_tool)
 {
-  GimpColorBalanceTool   *cb_tool = GIMP_COLOR_BALANCE_TOOL (im_tool);
+  GimpColorBalanceTool   *cb_tool = GIMP_COLOR_BALANCE_TOOL (image_map_tool);
   GimpColorBalanceConfig *config  = cb_tool->config;
+  GtkWidget              *main_vbox;
   GtkWidget              *vbox;
   GtkWidget              *hbox;
   GtkWidget              *table;
   GtkWidget              *button;
   GtkWidget              *frame;
 
+  main_vbox = gimp_image_map_tool_dialog_get_vbox (image_map_tool);
+
   frame = gimp_enum_radio_frame_new (GIMP_TYPE_TRANSFER_MODE,
                                      gtk_label_new (_("Select Range to Adjust")),
                                      G_CALLBACK (color_balance_range_callback),
@@ -270,11 +273,11 @@
                                      &cb_tool->range_radio);
   gimp_int_radio_group_set_active (GTK_RADIO_BUTTON (cb_tool->range_radio),
                                    config->range);
-  gtk_box_pack_start (GTK_BOX (im_tool->main_vbox), frame, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
   gtk_widget_show (frame);
 
   frame = gimp_frame_new (_("Adjust Color Levels"));
-  gtk_box_pack_start (GTK_BOX (im_tool->main_vbox), frame, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
   gtk_widget_show (frame);
 
   vbox = gtk_vbox_new (FALSE, 4);
@@ -331,7 +334,7 @@
     gtk_check_button_new_with_mnemonic (_("Preserve _luminosity"));
   gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (cb_tool->preserve_toggle),
                                 config->preserve_luminosity);
-  gtk_box_pack_end (GTK_BOX (im_tool->main_vbox), cb_tool->preserve_toggle,
+  gtk_box_pack_end (GTK_BOX (main_vbox), cb_tool->preserve_toggle,
                     FALSE, FALSE, 0);
   gtk_widget_show (cb_tool->preserve_toggle);
 

Modified: trunk/app/tools/gimpcolorizetool.c
==============================================================================
--- trunk/app/tools/gimpcolorizetool.c	(original)
+++ trunk/app/tools/gimpcolorizetool.c	Tue Jun  3 10:51:04 2008
@@ -45,7 +45,8 @@
 #include "gimp-intl.h"
 
 
-#define SLIDER_WIDTH 200
+#define SLIDER_WIDTH  200
+#define SPINNER_WIDTH 4
 
 
 /*  local function prototypes  */
@@ -208,19 +209,21 @@
 gimp_colorize_tool_dialog (GimpImageMapTool *image_map_tool)
 {
   GimpColorizeTool *col_tool = GIMP_COLORIZE_TOOL (image_map_tool);
+  GtkWidget        *main_vbox;
   GtkWidget        *table;
   GtkWidget        *slider;
   GtkWidget        *frame;
   GtkWidget        *vbox;
   GtkObject        *data;
 
+  main_vbox = gimp_image_map_tool_dialog_get_vbox (image_map_tool);
+
   frame = gimp_frame_new (_("Select Color"));
-  gtk_box_pack_start (GTK_BOX (image_map_tool->main_vbox), frame,
-                      FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
   gtk_widget_show (frame);
 
   /*  The table containing sliders  */
-  vbox = gtk_vbox_new (FALSE, 4);
+  vbox = gtk_vbox_new (FALSE, 6);
   gtk_container_add (GTK_CONTAINER (frame), vbox);
   gtk_widget_show (vbox);
 
@@ -232,7 +235,7 @@
 
   /*  Create the hue scale widget  */
   data = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,
-                               _("_Hue:"), SLIDER_WIDTH, -1,
+                               _("_Hue:"), SLIDER_WIDTH, SPINNER_WIDTH,
                                col_tool->config->hue * 360.0,
                                0.0, 360.0, 1.0, 15.0, 0,
                                TRUE, 0.0, 0.0,
@@ -247,7 +250,7 @@
 
   /*  Create the saturation scale widget  */
   data = gimp_scale_entry_new (GTK_TABLE (table), 0, 1,
-                               _("_Saturation:"), SLIDER_WIDTH, -1,
+                               _("_Saturation:"), SLIDER_WIDTH, SPINNER_WIDTH,
                                col_tool->config->saturation * 100.0,
                                0.0, 100.0, 1.0, 10.0, 0,
                                TRUE, 0.0, 0.0,
@@ -262,7 +265,7 @@
 
   /*  Create the lightness scale widget  */
   data = gimp_scale_entry_new (GTK_TABLE (table), 0, 2,
-                               _("_Lightness:"), SLIDER_WIDTH, -1,
+                               _("_Lightness:"), SLIDER_WIDTH, SPINNER_WIDTH,
                                col_tool->config->lightness * 100.0,
                                -100.0, 100.0, 1.0, 10.0, 0,
                                TRUE, 0.0, 0.0,

Modified: trunk/app/tools/gimpcurvestool.c
==============================================================================
--- trunk/app/tools/gimpcurvestool.c	(original)
+++ trunk/app/tools/gimpcurvestool.c	Tue Jun  3 10:51:04 2008
@@ -410,8 +410,9 @@
   GimpToolOptions  *tool_options = GIMP_TOOL_GET_OPTIONS (image_map_tool);
   GimpCurvesConfig *config       = tool->config;
   GtkListStore     *store;
+  GtkSizeGroup     *label_group;
+  GtkWidget        *main_vbox;
   GtkWidget        *vbox;
-  GtkWidget        *vbox2;
   GtkWidget        *hbox;
   GtkWidget        *hbox2;
   GtkWidget        *label;
@@ -421,17 +422,20 @@
   GtkWidget        *bar;
   GtkWidget        *combo;
 
-  vbox = image_map_tool->main_vbox;
+  main_vbox   = gimp_image_map_tool_dialog_get_vbox (image_map_tool);
+  label_group = gimp_image_map_tool_dialog_get_label_group (image_map_tool);
 
   /*  The combo box for selecting channels  */
   hbox = gtk_hbox_new (FALSE, 6);
-  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
   gtk_widget_show (hbox);
 
   label = gtk_label_new_with_mnemonic (_("Cha_nnel:"));
   gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
   gtk_widget_show (label);
 
+  gtk_size_group_add_widget (label_group, label);
+
   store = gimp_enum_store_new_with_range (GIMP_TYPE_HISTOGRAM_CHANNEL,
                                           GIMP_HISTOGRAM_VALUE,
                                           GIMP_HISTOGRAM_ALPHA);
@@ -471,17 +475,17 @@
   table = gtk_table_new (2, 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, TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (main_vbox), table, TRUE, TRUE, 0);
 
   /*  The left color bar  */
-  vbox2 = gtk_vbox_new (FALSE, 0);
-  gtk_table_attach (GTK_TABLE (table), vbox2, 0, 1, 0, 1,
+  vbox = gtk_vbox_new (FALSE, 0);
+  gtk_table_attach (GTK_TABLE (table), vbox, 0, 1, 0, 1,
                     GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
-  gtk_widget_show (vbox2);
+  gtk_widget_show (vbox);
 
   frame = gtk_frame_new (NULL);
   gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
-  gtk_box_pack_start (GTK_BOX (vbox2), frame, TRUE, TRUE, RADIUS);
+  gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, RADIUS);
   gtk_widget_show (frame);
 
   tool->yrange = gimp_color_bar_new (GTK_ORIENTATION_VERTICAL);
@@ -523,23 +527,23 @@
   gtk_box_pack_start (GTK_BOX (hbox2), frame, TRUE, TRUE, RADIUS);
   gtk_widget_show (frame);
 
-  vbox2 = gtk_vbox_new (TRUE, 0);
-  gtk_container_add (GTK_CONTAINER (frame), vbox2);
-  gtk_widget_show (vbox2);
+  vbox = gtk_vbox_new (TRUE, 0);
+  gtk_container_add (GTK_CONTAINER (frame), vbox);
+  gtk_widget_show (vbox);
 
   tool->xrange = gimp_color_bar_new (GTK_ORIENTATION_HORIZONTAL);
   gtk_widget_set_size_request (tool->xrange, -1, BAR_SIZE / 2);
-  gtk_box_pack_start (GTK_BOX (vbox2), tool->xrange, TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (vbox), tool->xrange, TRUE, TRUE, 0);
   gtk_widget_show (tool->xrange);
 
   bar = gimp_color_bar_new (GTK_ORIENTATION_HORIZONTAL);
-  gtk_box_pack_start (GTK_BOX (vbox2), bar, TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (vbox), bar, TRUE, TRUE, 0);
   gtk_widget_show (bar);
 
   gtk_widget_show (table);
 
   hbox = gtk_hbox_new (FALSE, 6);
-  gtk_box_pack_end (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+  gtk_box_pack_end (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
   gtk_widget_show (hbox);
 
   label = gtk_label_new_with_mnemonic (_("Curve _type:"));

Modified: trunk/app/tools/gimpdesaturatetool.c
==============================================================================
--- trunk/app/tools/gimpdesaturatetool.c	(original)
+++ trunk/app/tools/gimpdesaturatetool.c	Tue Jun  3 10:51:04 2008
@@ -181,8 +181,11 @@
 gimp_desaturate_tool_dialog (GimpImageMapTool *image_map_tool)
 {
   GimpDesaturateTool *desaturate_tool = GIMP_DESATURATE_TOOL (image_map_tool);
+  GtkWidget          *main_vbox;
   GtkWidget          *frame;
 
+  main_vbox = gimp_image_map_tool_dialog_get_vbox (image_map_tool);
+
   /*  The table containing sliders  */
   frame = gimp_enum_radio_frame_new (GIMP_TYPE_DESATURATE_MODE,
                                      gtk_label_new (_("Choose shade of gray based on:")),
@@ -190,8 +193,7 @@
                                      desaturate_tool,
                                      &desaturate_tool->button);
 
-  gtk_box_pack_start (GTK_BOX (image_map_tool->main_vbox), frame,
-                      FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
   gtk_widget_show (frame);
 }
 

Modified: trunk/app/tools/gimpgegltool.c
==============================================================================
--- trunk/app/tools/gimpgegltool.c	(original)
+++ trunk/app/tools/gimpgegltool.c	Tue Jun  3 10:51:04 2008
@@ -286,22 +286,28 @@
   GimpGeglTool    *tool = GIMP_GEGL_TOOL (image_map_tool);
   GtkListStore    *store;
   GtkCellRenderer *cell;
+  GtkSizeGroup    *label_group;
+  GtkWidget       *main_vbox;
   GtkWidget       *hbox;
   GtkWidget       *label;
   GtkWidget       *combo;
   GList           *opclasses;
   GList           *iter;
 
+  main_vbox   = gimp_image_map_tool_dialog_get_vbox (image_map_tool);
+  label_group = gimp_image_map_tool_dialog_get_label_group (image_map_tool);
+
   /*  The operation combo box  */
   hbox = gtk_hbox_new (FALSE, 6);
-  gtk_box_pack_start (GTK_BOX (image_map_tool->main_vbox), hbox,
-                      FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
   gtk_widget_show (hbox);
 
   label = gtk_label_new_with_mnemonic (_("_Operation:"));
   gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
   gtk_widget_show (label);
 
+  gtk_size_group_add_widget (label_group, label);
+
   store = gtk_list_store_new (1, G_TYPE_STRING);
 
   opclasses = gimp_get_geglopclasses ();
@@ -344,7 +350,7 @@
 
   /*  The options vbox  */
   tool->options_frame = gimp_frame_new (_("Operation Settings"));
-  gtk_box_pack_start (GTK_BOX (image_map_tool->main_vbox), tool->options_frame,
+  gtk_box_pack_start (GTK_BOX (main_vbox), tool->options_frame,
                       FALSE, FALSE, 0);
   gtk_widget_show (tool->options_frame);
 

Modified: trunk/app/tools/gimphuesaturationtool.c
==============================================================================
--- trunk/app/tools/gimphuesaturationtool.c	(original)
+++ trunk/app/tools/gimphuesaturationtool.c	Tue Jun  3 10:51:04 2008
@@ -223,6 +223,7 @@
 {
   GimpHueSaturationTool   *hs_tool = GIMP_HUE_SATURATION_TOOL (image_map_tool);
   GimpHueSaturationConfig *config  = hs_tool->config;
+  GtkWidget               *main_vbox;
   GtkWidget               *vbox;
   GtkWidget               *abox;
   GtkWidget               *table;
@@ -256,9 +257,10 @@
     { N_("_M"),      N_("Magenta"),           3, 2, 4, 2 }
   };
 
+  main_vbox = gimp_image_map_tool_dialog_get_vbox (image_map_tool);
+
   frame = gimp_frame_new (_("Select Primary Color to Adjust"));
-  gtk_box_pack_start (GTK_BOX (image_map_tool->main_vbox), frame,
-                      TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (main_vbox), frame, TRUE, TRUE, 0);
   gtk_widget_show (frame);
 
   vbox = gtk_vbox_new (FALSE, 6);
@@ -367,8 +369,7 @@
                     hs_tool);
 
   frame = gimp_frame_new (_("Adjust Selected Color"));
-  gtk_box_pack_start (GTK_BOX (image_map_tool->main_vbox), frame,
-                      FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
   gtk_widget_show (frame);
 
   /*  The table containing sliders  */

Modified: trunk/app/tools/gimpimagemaptool-settings.c
==============================================================================
--- trunk/app/tools/gimpimagemaptool-settings.c	(original)
+++ trunk/app/tools/gimpimagemaptool-settings.c	Tue Jun  3 10:51:04 2008
@@ -130,7 +130,7 @@
   if (gimp_container_num_children (klass->recent_settings) == 0)
     gimp_image_map_tool_recent_deserialize (image_map_tool);
 
-  hbox = gtk_hbox_new (FALSE, 4);
+  hbox = gtk_hbox_new (FALSE, 6);
   gtk_box_pack_start (GTK_BOX (image_map_tool->main_vbox), hbox,
                       FALSE, FALSE, 0);
   gtk_widget_show (hbox);
@@ -139,6 +139,10 @@
   gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
   gtk_widget_show (label);
 
+  image_map_tool->label_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
+  gtk_size_group_add_widget (image_map_tool->label_group, label);
+  g_object_unref (image_map_tool->label_group);
+
   combo = gimp_container_combo_box_new (klass->recent_settings,
                                         GIMP_CONTEXT (tool_info->tool_options),
                                         16, 0);

Modified: trunk/app/tools/gimpimagemaptool.c
==============================================================================
--- trunk/app/tools/gimpimagemaptool.c	(original)
+++ trunk/app/tools/gimpimagemaptool.c	Tue Jun  3 10:51:04 2008
@@ -679,3 +679,20 @@
                     GIMP_CONFIG (GIMP_IMAGE_MAP_TOOL (new_tool)->config),
                     0);
 }
+
+GtkWidget *
+gimp_image_map_tool_dialog_get_vbox (GimpImageMapTool *tool)
+{
+  g_return_val_if_fail (GIMP_IS_IMAGE_MAP_TOOL (tool), NULL);
+
+  return tool->main_vbox;
+}
+
+
+GtkSizeGroup *
+gimp_image_map_tool_dialog_get_label_group (GimpImageMapTool *tool)
+{
+  g_return_val_if_fail (GIMP_IS_IMAGE_MAP_TOOL (tool), NULL);
+
+  return tool->label_group;
+}

Modified: trunk/app/tools/gimpimagemaptool.h
==============================================================================
--- trunk/app/tools/gimpimagemaptool.h	(original)
+++ trunk/app/tools/gimpimagemaptool.h	Tue Jun  3 10:51:04 2008
@@ -54,6 +54,7 @@
   GtkWidget             *favorites_menu;
   GtkWidget             *import_item;
   GtkWidget             *export_item;
+  GtkSizeGroup          *label_group;
 
   /* settings file dialog */
   GtkWidget             *settings_dialog;
@@ -97,5 +98,9 @@
                                         const gchar      *new_tool_id,
                                         GimpConfig       *config);
 
+/* accessors for derived classes */
+GtkWidget    * gimp_image_map_tool_dialog_get_vbox        (GimpImageMapTool *tool);
+GtkSizeGroup * gimp_image_map_tool_dialog_get_label_group (GimpImageMapTool *tool);
+
 
 #endif  /*  __GIMP_IMAGE_MAP_TOOL_H__  */

Modified: trunk/app/tools/gimplevelstool.c
==============================================================================
--- trunk/app/tools/gimplevelstool.c	(original)
+++ trunk/app/tools/gimplevelstool.c	Tue Jun  3 10:51:04 2008
@@ -344,6 +344,8 @@
   GimpToolOptions  *tool_options = GIMP_TOOL_GET_OPTIONS (image_map_tool);
   GimpLevelsConfig *config       = tool->config;
   GtkListStore     *store;
+  GtkSizeGroup     *label_group;
+  GtkWidget        *main_vbox;
   GtkWidget        *vbox;
   GtkWidget        *vbox2;
   GtkWidget        *vbox3;
@@ -359,16 +361,20 @@
   GtkObject        *data;
   gint              border;
 
+  main_vbox   = gimp_image_map_tool_dialog_get_vbox (image_map_tool);
+  label_group = gimp_image_map_tool_dialog_get_label_group (image_map_tool);
+
   /*  The option menu for selecting channels  */
   hbox = gtk_hbox_new (FALSE, 6);
-  gtk_box_pack_start (GTK_BOX (image_map_tool->main_vbox), hbox,
-                      FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
   gtk_widget_show (hbox);
 
   label = gtk_label_new_with_mnemonic (_("Cha_nnel:"));
   gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
   gtk_widget_show (label);
 
+  gtk_size_group_add_widget (label_group, label);
+
   store = gimp_enum_store_new_with_range (GIMP_TYPE_HISTOGRAM_CHANNEL,
                                           GIMP_HISTOGRAM_VALUE,
                                           GIMP_HISTOGRAM_ALPHA);
@@ -403,8 +409,7 @@
 
   /*  Input levels frame  */
   frame = gimp_frame_new (_("Input Levels"));
-  gtk_box_pack_start (GTK_BOX (image_map_tool->main_vbox), frame,
-                      TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (main_vbox), frame, TRUE, TRUE, 0);
   gtk_widget_show (frame);
 
   vbox = gtk_vbox_new (FALSE, 2);
@@ -549,8 +554,7 @@
 
   /*  Output levels frame  */
   frame = gimp_frame_new (_("Output Levels"));
-  gtk_box_pack_start (GTK_BOX (image_map_tool->main_vbox), frame,
-                      FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
   gtk_widget_show (frame);
 
   vbox = gtk_vbox_new (FALSE, 4);
@@ -627,8 +631,7 @@
 
   /*  all channels frame  */
   frame = gimp_frame_new (_("All Channels"));
-  gtk_box_pack_start (GTK_BOX (image_map_tool->main_vbox), frame,
-                      FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0);
   gtk_widget_show (frame);
 
   hbox = gtk_hbox_new (FALSE, 6);
@@ -669,8 +672,7 @@
 
   button = gimp_stock_button_new (GIMP_STOCK_TOOL_CURVES,
                                   _("Edit these Settings as Curves"));
-  gtk_box_pack_start (GTK_BOX (image_map_tool->main_vbox), button,
-                      FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (main_vbox), button, FALSE, FALSE, 0);
   gtk_widget_show (button);
 
   g_signal_connect (button, "clicked",

Modified: trunk/app/tools/gimpposterizetool.c
==============================================================================
--- trunk/app/tools/gimpposterizetool.c	(original)
+++ trunk/app/tools/gimpposterizetool.c	Tue Jun  3 10:51:04 2008
@@ -209,15 +209,17 @@
 gimp_posterize_tool_dialog (GimpImageMapTool *image_map_tool)
 {
   GimpPosterizeTool *posterize_tool = GIMP_POSTERIZE_TOOL (image_map_tool);
+  GtkWidget         *main_vbox;
   GtkWidget         *table;
   GtkWidget         *slider;
   GtkObject         *data;
 
+  main_vbox = gimp_image_map_tool_dialog_get_vbox (image_map_tool);
+
   /*  The table containing sliders  */
   table = gtk_table_new (1, 3, FALSE);
   gtk_table_set_col_spacings (GTK_TABLE (table), 4);
-  gtk_box_pack_start (GTK_BOX (image_map_tool->main_vbox), table,
-                      FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (main_vbox), table, FALSE, FALSE, 0);
   gtk_widget_show (table);
 
   data = gimp_scale_entry_new (GTK_TABLE (table), 0, 0,

Modified: trunk/app/tools/gimpthresholdtool.c
==============================================================================
--- trunk/app/tools/gimpthresholdtool.c	(original)
+++ trunk/app/tools/gimpthresholdtool.c	Tue Jun  3 10:51:04 2008
@@ -222,16 +222,16 @@
   GimpThresholdTool   *t_tool       = GIMP_THRESHOLD_TOOL (image_map_tool);
   GimpToolOptions     *tool_options = GIMP_TOOL_GET_OPTIONS (image_map_tool);
   GimpThresholdConfig *config       = t_tool->config;
-  GtkWidget           *vbox;
+  GtkWidget           *main_vbox;
   GtkWidget           *hbox;
   GtkWidget           *menu;
   GtkWidget           *box;
   GtkWidget           *button;
 
-  vbox = image_map_tool->main_vbox;
+  main_vbox = gimp_image_map_tool_dialog_get_vbox (image_map_tool);
 
   hbox = gtk_hbox_new (FALSE, 6);
-  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
   gtk_widget_show (hbox);
 
   menu = gimp_prop_enum_stock_box_new (G_OBJECT (tool_options),
@@ -241,7 +241,7 @@
   gtk_widget_show (menu);
 
   box = gimp_histogram_box_new ();
-  gtk_box_pack_start (GTK_BOX (vbox), box, TRUE, TRUE, 0);
+  gtk_box_pack_start (GTK_BOX (main_vbox), box, TRUE, TRUE, 0);
   gtk_widget_show (box);
 
   t_tool->histogram_box = GIMP_HISTOGRAM_BOX (box);
@@ -258,7 +258,7 @@
                                        t_tool->histogram_box->view);
 
   hbox = gtk_hbox_new (FALSE, 6);
-  gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 0);
   gtk_widget_show (hbox);
 
   button = gtk_button_new_with_mnemonic (_("_Auto"));

Modified: trunk/app/widgets/widgets-enums.c
==============================================================================
--- trunk/app/widgets/widgets-enums.c	(original)
+++ trunk/app/widgets/widgets-enums.c	Tue Jun  3 10:51:04 2008
@@ -226,8 +226,8 @@
 
   static const GimpEnumDesc descs[] =
   {
-    { GIMP_HISTOGRAM_SCALE_LINEAR, N_("Linear"), NULL },
-    { GIMP_HISTOGRAM_SCALE_LOGARITHMIC, N_("Logarithmic"), NULL },
+    { GIMP_HISTOGRAM_SCALE_LINEAR, N_("Linear histogram"), NULL },
+    { GIMP_HISTOGRAM_SCALE_LOGARITHMIC, N_("Logarithmic histogram"), NULL },
     { 0, NULL, NULL }
   };
 

Modified: trunk/app/widgets/widgets-enums.h
==============================================================================
--- trunk/app/widgets/widgets-enums.h	(original)
+++ trunk/app/widgets/widgets-enums.h	Tue Jun  3 10:51:04 2008
@@ -112,8 +112,8 @@
 
 typedef enum
 {
-  GIMP_HISTOGRAM_SCALE_LINEAR,       /*< desc="Linear"      >*/
-  GIMP_HISTOGRAM_SCALE_LOGARITHMIC   /*< desc="Logarithmic" >*/
+  GIMP_HISTOGRAM_SCALE_LINEAR,       /*< desc="Linear histogram"      >*/
+  GIMP_HISTOGRAM_SCALE_LOGARITHMIC   /*< desc="Logarithmic histogram" >*/
 } GimpHistogramScale;
 
 



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