[gimp] app: in _gimp_prop_gui_new_generic(), use "range-label" pspec key as range label
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: in _gimp_prop_gui_new_generic(), use "range-label" pspec key as range label
- Date: Tue, 2 Jun 2020 20:56:41 +0000 (UTC)
commit 4492f61df4483aad5cb34b4cfb9c741c549fc572
Author: Ell <ell_se yahoo com>
Date: Tue Jun 2 23:54:15 2020 +0300
app: in _gimp_prop_gui_new_generic(), use "range-label" pspec key as range label
... when available
app/propgui/gimppropgui-generic.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
---
diff --git a/app/propgui/gimppropgui-generic.c b/app/propgui/gimppropgui-generic.c
index 1e277e7324..775caef13c 100644
--- a/app/propgui/gimppropgui-generic.c
+++ b/app/propgui/gimppropgui-generic.c
@@ -205,6 +205,7 @@ _gimp_prop_gui_new_generic (GObject *config,
GtkWidget *frame;
GtkWidget *range;
const gchar *label_str;
+ const gchar *range_label_str;
gdouble step_increment;
gdouble page_increment;
gdouble ui_lower;
@@ -223,6 +224,12 @@ _gimp_prop_gui_new_generic (GObject *config,
creator,
&label_str);
+ range_label_str = gegl_param_spec_get_property_key (pspec,
+ "range-label");
+
+ if (range_label_str)
+ label_str = range_label_str;
+
g_object_set_data_full (G_OBJECT (vbox),
"gimp-underlying-widget",
g_object_ref_sink (spin_scale),
@@ -239,9 +246,12 @@ _gimp_prop_gui_new_generic (GObject *config,
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
gtk_widget_show (label);
- g_object_bind_property (spin_scale, "label",
- label, "label",
- G_BINDING_SYNC_CREATE);
+ if (! range_label_str)
+ {
+ g_object_bind_property (spin_scale, "label",
+ label, "label",
+ G_BINDING_SYNC_CREATE);
+ }
frame = gimp_frame_new (NULL);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]