[gegl] gcut: change number of significant digits to 5
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gcut: change number of significant digits to 5
- Date: Mon, 17 Jul 2017 17:45:09 +0000 (UTC)
commit 6edd0d88e25b0db6b8728caba220abc44108727e
Author: Øyvind Kolås <pippin gimp org>
Date: Mon Jul 17 19:39:25 2017 +0200
gcut: change number of significant digits to 5
gcut/gcut-ui.c | 18 ++++++++----------
gcut/gcut.h | 6 +++---
2 files changed, 11 insertions(+), 13 deletions(-)
---
diff --git a/gcut/gcut-ui.c b/gcut/gcut-ui.c
index 7b9c149..04e3520 100644
--- a/gcut/gcut-ui.c
+++ b/gcut/gcut-ui.c
@@ -1714,12 +1714,11 @@ static void drag_int_slider (MrgEvent *e, void *data1, void *data2)
static void update_double_string (const char *new_string, void *user_data)
{
gdouble val = g_strtod (new_string, NULL);
- GParamSpec *pspec = gegl_operation_find_property (gegl_node_get_operation(snode), sprop);
- GParamSpecDouble *ips = (void*)pspec;
+ GParamSpecDouble *spec = (void*)gegl_operation_find_property (gegl_node_get_operation(snode), sprop);
- if (val < ips->minimum) val = ips->minimum;
- if (val > ips->maximum) val = ips->maximum;
- sprintf (tmpstr, "%.3f", val);
+ if (val < spec->minimum) val = spec->minimum;
+ if (val > spec->maximum) val = spec->maximum;
+ sprintf (tmpstr, "%.5f", val);
if (snode && sprop)
gegl_node_set (snode, sprop, val, NULL);
@@ -1729,11 +1728,10 @@ static void update_double_string (const char *new_string, void *user_data)
static void update_int_string (const char *new_string, void *user_data)
{
int val = atoi (new_string);
- GParamSpec *pspec = gegl_operation_find_property (gegl_node_get_operation(snode), sprop);
- GParamSpecInt *ips = (void*)pspec;
+ GParamSpecInt *spec = (void*)gegl_operation_find_property (gegl_node_get_operation(snode), sprop);
- if (val < ips->minimum) val = ips->minimum;
- if (val > ips->maximum) val = ips->maximum;
+ if (val < spec->minimum) val = spec->minimum;
+ if (val > spec->maximum) val = spec->maximum;
sprintf (tmpstr, "%d", val);
if (snode && sprop)
@@ -1817,7 +1815,7 @@ static float print_props (Mrg *mrg, GeglEDL *edl, GeglNode *node, float x, float
#endif
mrg_printf (mrg, "%s: ", props[i]->name);
- str = g_strdup_printf ("%.3f", val);
+ str = g_strdup_printf ("%.5f", val);
if (snode && !strcmp (props[i]->name, sprop))
{
diff --git a/gcut/gcut.h b/gcut/gcut.h
index 5391870..a4fe599 100644
--- a/gcut/gcut.h
+++ b/gcut/gcut.h
@@ -72,11 +72,11 @@ const char *compute_cache_path (const char *path);
enum {
GEDL_UI_MODE_FULL = 0,
GEDL_UI_MODE_NONE = 1,
- GEDL_UI_MODE_TIMELINE = 2,
- GEDL_UI_MODE_PART = 3,
+ GEDL_UI_MODE_PART = 2,
+ GEDL_UI_MODE_TIMELINE = 3,
};
-#define GEDL_LAST_UI_MODE 1
+#define GEDL_LAST_UI_MODE 2
GeglEDL *gcut_new (void);
void gcut_free (GeglEDL *edl);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]