[gimp] app: ellipsize most tool options combo boxes



commit fc0765ce16a5b95124a98f8ff746572c006dae44
Author: Michael Natterer <mitch gimp org>
Date:   Mon Jun 3 17:35:36 2013 +0200

    app: ellipsize most tool options combo boxes
    
    which means that now check/radio button labels are our biggest
    width-wasters.

 app/tools/gimpalignoptions.c     |    1 +
 app/tools/gimpcloneoptions-gui.c |    2 +
 app/tools/gimphealtool.c         |    1 +
 app/tools/gimppaintoptions-gui.c |    2 +
 app/tools/gimprectangleoptions.c |    1 +
 app/tools/gimptransformoptions.c |    3 ++
 app/tools/gimpwarpoptions.c      |   57 ++++++++++++++++++-------------------
 7 files changed, 38 insertions(+), 29 deletions(-)
---
diff --git a/app/tools/gimpalignoptions.c b/app/tools/gimpalignoptions.c
index 6cd792f..1a80f76 100644
--- a/app/tools/gimpalignoptions.c
+++ b/app/tools/gimpalignoptions.c
@@ -280,6 +280,7 @@ gimp_align_options_gui (GimpToolOptions *tool_options)
 
   combo = gimp_prop_enum_combo_box_new (config, "align-reference", 0, 0);
   gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Relative to"));
+  g_object_set (combo, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
   gtk_box_pack_start (GTK_BOX (align_vbox), combo, FALSE, FALSE, 0);
   gtk_widget_show (combo);
 
diff --git a/app/tools/gimpcloneoptions-gui.c b/app/tools/gimpcloneoptions-gui.c
index a499c42..dc328cb 100644
--- a/app/tools/gimpcloneoptions-gui.c
+++ b/app/tools/gimpcloneoptions-gui.c
@@ -68,6 +68,7 @@ gimp_clone_options_gui (GimpToolOptions *tool_options)
   /*  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"));
+  g_object_set (combo, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
   gtk_frame_set_label_widget (GTK_FRAME (frame), combo);
   gtk_widget_show (combo);
 
@@ -100,6 +101,7 @@ gimp_clone_options_gui (GimpToolOptions *tool_options)
 
   combo = gimp_prop_enum_combo_box_new (config, "align-mode", 0, 0);
   gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Alignment"));
+  g_object_set (combo, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
   gtk_box_pack_start (GTK_BOX (vbox), combo, TRUE, TRUE, 0);
   gtk_widget_show (combo);
 
diff --git a/app/tools/gimphealtool.c b/app/tools/gimphealtool.c
index 54c5d60..9e8aaf6 100644
--- a/app/tools/gimphealtool.c
+++ b/app/tools/gimphealtool.c
@@ -103,6 +103,7 @@ gimp_heal_options_gui (GimpToolOptions *tool_options)
   /* the alignment combo */
   combo = gimp_prop_enum_combo_box_new (config, "align-mode", 0, 0);
   gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Alignment"));
+  g_object_set (combo, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
   gtk_box_pack_start (GTK_BOX (vbox), combo, TRUE, TRUE, 0);
   gtk_widget_show (combo);
 
diff --git a/app/tools/gimppaintoptions-gui.c b/app/tools/gimppaintoptions-gui.c
index d4e7a44..0275db9 100644
--- a/app/tools/gimppaintoptions-gui.c
+++ b/app/tools/gimppaintoptions-gui.c
@@ -85,6 +85,7 @@ gimp_paint_options_gui (GimpToolOptions *tool_options)
   /*  the paint mode menu  */
   menu = gimp_prop_paint_mode_menu_new (config, "paint-mode", TRUE, FALSE);
   gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (menu), _("Mode"));
+  g_object_set (menu, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
   gtk_box_pack_start (GTK_BOX (vbox), menu, FALSE, FALSE, 0);
   gtk_widget_show (menu);
 
@@ -321,6 +322,7 @@ dynamics_options_gui (GimpPaintOptions *paint_options,
   /*  the repeat type  */
   combo = gimp_prop_enum_combo_box_new (config, "fade-repeat", 0, 0);
   gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Repeat"));
+  g_object_set (combo, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
   gtk_box_pack_start (GTK_BOX (inner_vbox), combo, TRUE, TRUE, 0);
   gtk_widget_show (combo);
 
diff --git a/app/tools/gimprectangleoptions.c b/app/tools/gimprectangleoptions.c
index 8404622..b8b6d54 100644
--- a/app/tools/gimprectangleoptions.c
+++ b/app/tools/gimprectangleoptions.c
@@ -869,6 +869,7 @@ gimp_rectangle_options_gui (GimpToolOptions *tool_options)
 
     combo = gimp_prop_enum_combo_box_new (config, "fixed-rule", 0, 0);
     gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Fixed"));
+    g_object_set (combo, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
     gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
     gtk_widget_show (combo);
 
diff --git a/app/tools/gimptransformoptions.c b/app/tools/gimptransformoptions.c
index 5f61f3c..769781a 100644
--- a/app/tools/gimptransformoptions.c
+++ b/app/tools/gimptransformoptions.c
@@ -400,12 +400,14 @@ gimp_transform_options_gui (GimpToolOptions *tool_options)
   /*  the interpolation menu  */
   combo = gimp_prop_enum_combo_box_new (config, "interpolation", 0, 0);
   gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Interpolation"));
+  g_object_set (combo, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
   gtk_box_pack_start (GTK_BOX (vbox), combo, FALSE, FALSE, 0);
   gtk_widget_show (combo);
 
   /*  the clipping menu  */
   combo = gimp_prop_enum_combo_box_new (config, "clip", 0, 0);
   gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Clipping"));
+  g_object_set (combo, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
   gtk_box_pack_start (GTK_BOX (vbox), combo, FALSE, FALSE, 0);
   gtk_widget_show (combo);
 
@@ -426,6 +428,7 @@ gimp_transform_options_gui (GimpToolOptions *tool_options)
   /*  the guides type menu  */
   combo = gimp_prop_enum_combo_box_new (config, "grid-type", 0, 0);
   gimp_int_combo_box_set_label (GIMP_INT_COMBO_BOX (combo), _("Guides"));
+  g_object_set (combo, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
   gtk_frame_set_label_widget (GTK_FRAME (frame), combo);
   gtk_widget_show (combo);
 
diff --git a/app/tools/gimpwarpoptions.c b/app/tools/gimpwarpoptions.c
index 1cc6849..ddaadbd 100644
--- a/app/tools/gimpwarpoptions.c
+++ b/app/tools/gimpwarpoptions.c
@@ -161,35 +161,34 @@ gimp_warp_options_gui (GimpToolOptions *tool_options)
 {
   GObject   *config = G_OBJECT (tool_options);
   GtkWidget *vbox   = gimp_tool_options_gui (tool_options);
-  GtkWidget *behavior;
-  GtkWidget *strength;
-  GtkWidget *size;
-  GtkWidget *hardness;
-
-  behavior = gimp_prop_enum_combo_box_new (config, "behavior", 0, 0);
-  gtk_box_pack_start (GTK_BOX (vbox), behavior, FALSE, FALSE, 0);
-  gtk_widget_show (behavior);
-
-  strength = gimp_prop_spin_scale_new (config, "effect-strength",
-                                       _("Strength"),
-                                       1, 10, 1);
-  gimp_spin_scale_set_scale_limits (GIMP_SPIN_SCALE (strength), 1.0, 100.0);
-  gtk_box_pack_start (GTK_BOX (vbox), strength, FALSE, FALSE, 0);
-  gtk_widget_show (strength);
-
-  size = gimp_prop_spin_scale_new (config, "effect-size",
-                                   _("Size"),
-                                   0.01, 1.0, 2);
-  gimp_spin_scale_set_scale_limits (GIMP_SPIN_SCALE (size), 1.0, 1000.0);
-  gtk_box_pack_start (GTK_BOX (vbox),  size, FALSE, FALSE, 0);
-  gtk_widget_show (size);
-
-  hardness = gimp_prop_spin_scale_new (config, "effect-hardness",
-                                       _("Hardness"),
-                                       0.01, 1.0, 2);
-  gimp_spin_scale_set_scale_limits (GIMP_SPIN_SCALE (hardness), 0.0, 1.0);
-  gtk_box_pack_start (GTK_BOX (vbox),  hardness, FALSE, FALSE, 0);
-  gtk_widget_show (hardness);
+  GtkWidget *combo;
+  GtkWidget *scale;
+
+  combo = gimp_prop_enum_combo_box_new (config, "behavior", 0, 0);
+  g_object_set (combo, "ellipsize", PANGO_ELLIPSIZE_END, NULL);
+  gtk_box_pack_start (GTK_BOX (vbox), combo, FALSE, FALSE, 0);
+  gtk_widget_show (combo);
+
+  scale = gimp_prop_spin_scale_new (config, "effect-strength",
+                                    _("Strength"),
+                                    1, 10, 1);
+  gimp_spin_scale_set_scale_limits (GIMP_SPIN_SCALE (scale), 1.0, 100.0);
+  gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
+  gtk_widget_show (scale);
+
+  scale = gimp_prop_spin_scale_new (config, "effect-size",
+                                    _("Size"),
+                                    0.01, 1.0, 2);
+  gimp_spin_scale_set_scale_limits (GIMP_SPIN_SCALE (scale), 1.0, 1000.0);
+  gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
+  gtk_widget_show (scale);
+
+  scale = gimp_prop_spin_scale_new (config, "effect-hardness",
+                                    _("Hardness"),
+                                    0.01, 1.0, 2);
+  gimp_spin_scale_set_scale_limits (GIMP_SPIN_SCALE (scale), 0.0, 1.0);
+  gtk_box_pack_start (GTK_BOX (vbox), scale, FALSE, FALSE, 0);
+  gtk_widget_show (scale);
 
   return vbox;
 }


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