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.
This commit is contained in:
Michael Natterer 2014-06-01 23:39:19 +02:00
parent 06d91251da
commit 1464bee257
3 changed files with 6 additions and 0 deletions

View File

@ -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);

View File

@ -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",

View File

@ -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);