[gimp] app: use step, page and digits as provided by gegl pspecs
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: use step, page and digits as provided by gegl pspecs
- Date: Tue, 20 May 2014 14:17:10 +0000 (UTC)
commit b919d7a82fc41578e6a2c5d2740ddc1d86aa05a1
Author: Øyvind Kolås <pippin gimp org>
Date: Tue May 20 16:16:18 2014 +0200
app: use step, page and digits as provided by gegl pspecs
app/core/gimpparamspecs-duplicate.c | 8 ++++++++
app/widgets/gimpproptable.c | 16 ++++++++++++----
2 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/app/core/gimpparamspecs-duplicate.c b/app/core/gimpparamspecs-duplicate.c
index e363afb..b3205a5 100644
--- a/app/core/gimpparamspecs-duplicate.c
+++ b/app/core/gimpparamspecs-duplicate.c
@@ -120,6 +120,11 @@ gimp_param_spec_duplicate (GParamSpec *pspec)
gspec->ui_maximum,
gspec->ui_gamma,
flags);
+ gegl_param_spec_double_set_steps (GEGL_PARAM_SPEC_DOUBLE (copy),
+ gspec->ui_step_small,
+ gspec->ui_step_big);
+ gegl_param_spec_double_set_digits (GEGL_PARAM_SPEC_DOUBLE (copy),
+ gspec->ui_digits);
}
else if (G_IS_PARAM_SPEC_DOUBLE (pspec))
{
@@ -160,6 +165,9 @@ gimp_param_spec_duplicate (GParamSpec *pspec)
gspec->ui_maximum,
gspec->ui_gamma,
flags);
+ gegl_param_spec_int_set_steps (GEGL_PARAM_SPEC_INT (copy),
+ gspec->ui_step_small,
+ gspec->ui_step_big);
}
else if (GEGL_IS_PARAM_SPEC_SEED (pspec))
{
diff --git a/app/widgets/gimpproptable.c b/app/widgets/gimpproptable.c
index a2051e9..a5fa0a1 100644
--- a/app/widgets/gimpproptable.c
+++ b/app/widgets/gimpproptable.c
@@ -236,11 +236,19 @@ gimp_prop_table_new (GObject *config,
G_STRFUNC);
}
- if (HAS_KEY (pspec, "unit", "degree"))
+ if (GEGL_IS_PARAM_SPEC_DOUBLE (pspec))
{
- step = 1.0;
- page = 15.0;
- digits = 2;
+ GeglParamSpecDouble *gspec = GEGL_PARAM_SPEC_DOUBLE (pspec);
+ step = gspec->ui_step_small;
+ page = gspec->ui_step_big;
+ digits = gspec->ui_digits;
+ }
+ else if (GEGL_IS_PARAM_SPEC_INT (pspec))
+ {
+ GeglParamSpecInt *gspec = GEGL_PARAM_SPEC_INT (pspec);
+ step = gspec->ui_step_small;
+ page = gspec->ui_step_big;
+ digits = 0;
}
else if ((upper - lower <= 1.0) &&
(G_IS_PARAM_SPEC_FLOAT (pspec) ||
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]