summaryrefslogtreecommitdiffstats
path: root/gtk/src/values.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2008-10-17 16:20:43 +0000
committerjstebbins <[email protected]>2008-10-17 16:20:43 +0000
commitc169470e5c6d06fa8eec2835af1aaf4f6d210faa (patch)
tree3ab890310d672f80090f8871a1f3c785e5e6991d /gtk/src/values.c
parent9938bfacd7807ac96236a9111101f8479f3d157b (diff)
LinGui: Make preset key/values mostly align with macui presets.
One step closer to having a common preset format. Audio presets are still not compatible. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1840 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/values.c')
-rw-r--r--gtk/src/values.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gtk/src/values.c b/gtk/src/values.c
index 4124b0a26..d8dd74330 100644
--- a/gtk/src/values.c
+++ b/gtk/src/values.c
@@ -683,16 +683,23 @@ ghb_array_len(const GValue *gval)
static void
xform_string_int(const GValue *sval, GValue *ival)
{
+ gchar *end;
+
const gchar *str = g_value_get_string(sval);
- gint val = g_strtod(str, NULL);
+ gint val = g_strtod(str, &end);
+ if (*end)
+ val = ~0>>1;
g_value_set_int(ival, val);
}
static void
xform_string_int64(const GValue *sval, GValue *ival)
{
+ gchar *end;
const gchar *str = g_value_get_string(sval);
- gint64 val = g_strtod(str, NULL);
+ gint64 val = g_strtod(str, &end);
+ if (*end)
+ val = ~0L>>1;
g_value_set_int64(ival, val);
}