[gimp] app: add gimp_prop_range_set_ui_limits()
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: add gimp_prop_range_set_ui_limits()
- Date: Tue, 2 Jun 2020 20:30:23 +0000 (UTC)
commit ce8235e97703bca8baec84b6b41de5f47cfc23c1
Author: Ell <ell_se yahoo com>
Date: Tue Jun 2 18:30:07 2020 +0300
app: add gimp_prop_range_set_ui_limits()
... which sets the limits of the range-widget's handle-bar
explicitly, instead of using the lower/upper properties' limits.
app/widgets/gimppropwidgets.c | 16 ++++++++++++++++
app/widgets/gimppropwidgets.h | 3 +++
2 files changed, 19 insertions(+)
---
diff --git a/app/widgets/gimppropwidgets.c b/app/widgets/gimppropwidgets.c
index 930b4a5ce1..c9560c0435 100644
--- a/app/widgets/gimppropwidgets.c
+++ b/app/widgets/gimppropwidgets.c
@@ -1034,6 +1034,8 @@ gimp_prop_range_new (GObject *config,
gimp_handle_bar_connect_events (GIMP_HANDLE_BAR (handle_bar), color_bar);
+ g_object_set_data (G_OBJECT (vbox), "gimp-range-handle-bar", handle_bar);
+
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
@@ -1064,6 +1066,20 @@ gimp_prop_range_new (GObject *config,
return vbox;
}
+void
+gimp_prop_range_set_ui_limits (GtkWidget *widget,
+ gdouble lower,
+ gdouble upper)
+{
+ GimpHandleBar *handle_bar;
+
+ g_return_if_fail (GTK_IS_WIDGET (widget));
+
+ handle_bar = g_object_get_data (G_OBJECT (widget), "gimp-range-handle-bar");
+
+ gimp_handle_bar_set_limits (handle_bar, lower, upper);
+}
+
/**********/
/* view */
diff --git a/app/widgets/gimppropwidgets.h b/app/widgets/gimppropwidgets.h
index 2aeb3196e9..7b89aa0830 100644
--- a/app/widgets/gimppropwidgets.h
+++ b/app/widgets/gimppropwidgets.h
@@ -88,6 +88,9 @@ GtkWidget * gimp_prop_range_new (GObject *config,
gdouble page_increment,
gint digits,
gboolean sorted);
+void gimp_prop_range_set_ui_limits (GtkWidget *widget,
+ gdouble lower,
+ gdouble upper);
/* GParamObject (GimpViewable) */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]