From 1464bee25798437b5bf8f42cd248b3ec0e4dd486 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Sun, 1 Jun 2014 23:39:19 +0200 Subject: [PATCH] app: use the GParamSpec's nick as label in gimp_prop_spin_scale_new() if a NULL label was passed. Override this with explicit calls to gimp_spin_scale_set_label() in the two cases where we really don't want a label. --- app/tools/gimpcolorbalancetool.c | 1 + app/tools/gimptransformoptions.c | 2 ++ app/widgets/gimppropwidgets.c | 3 +++ 3 files changed, 6 insertions(+) diff --git a/app/tools/gimpcolorbalancetool.c b/app/tools/gimpcolorbalancetool.c index 0e87956118..9544bf94db 100644 --- a/app/tools/gimpcolorbalancetool.c +++ b/app/tools/gimpcolorbalancetool.c @@ -168,6 +168,7 @@ create_levels_scale (GObject *config, scale = gimp_prop_spin_scale_new (config, property_name, NULL, 0.01, 0.1, 0); + gimp_spin_scale_set_label (GIMP_SPIN_SCALE (scale), NULL); gimp_prop_widget_set_factor (scale, 100.0, 0.0, 0.0, 1); gtk_table_attach_defaults (GTK_TABLE (table), scale, 1, 2, col, col + 1); gtk_widget_show (scale); diff --git a/app/tools/gimptransformoptions.c b/app/tools/gimptransformoptions.c index 4cc1e25f52..e12d3459f3 100644 --- a/app/tools/gimptransformoptions.c +++ b/app/tools/gimptransformoptions.c @@ -31,6 +31,7 @@ #include "core/gimptoolinfo.h" #include "widgets/gimppropwidgets.h" +#include "widgets/gimpspinscale.h" #include "widgets/gimpwidgets-utils.h" #include "gimprotatetool.h" @@ -438,6 +439,7 @@ gimp_transform_options_gui (GimpToolOptions *tool_options) /* the grid density scale */ scale = gimp_prop_spin_scale_new (config, "grid-size", NULL, 1.8, 8.0, 0); + gimp_spin_scale_set_label (GIMP_SPIN_SCALE (scale), NULL); gtk_container_add (GTK_CONTAINER (frame), scale); g_object_bind_property_full (config, "grid-type", diff --git a/app/widgets/gimppropwidgets.c b/app/widgets/gimppropwidgets.c index 248af8666c..8635b3135c 100644 --- a/app/widgets/gimppropwidgets.c +++ b/app/widgets/gimppropwidgets.c @@ -497,6 +497,9 @@ gimp_prop_spin_scale_new (GObject *config, if (! G_IS_PARAM_SPEC_DOUBLE (param_spec)) digits = 0; + if (! label) + label = g_param_spec_get_nick (param_spec); + adjustment = gtk_adjustment_new (value, lower, upper, step_increment, page_increment, 0.0);