From f8ffac53c514145dc35ebe11f54471bd3b67dccf Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Tue, 10 Oct 2017 15:04:14 +0200 Subject: Parse enum props as uints --- src/uca-camera.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/uca-camera.c b/src/uca-camera.c index 7987632..31e5de5 100644 --- a/src/uca-camera.c +++ b/src/uca-camera.c @@ -155,6 +155,7 @@ DEFINE_CAST (uint64, atoi) DEFINE_CAST (ulong, atol) DEFINE_CAST (float, atof) DEFINE_CAST (double, atof) +DEFINE_CAST (enum, atoi) DEFINE_CAST (boolean, str_to_boolean) @@ -650,6 +651,7 @@ uca_camera_parse_arg_props (UcaCamera *camera, gchar **argv, guint argc, GError g_value_register_transform_func (G_TYPE_STRING, G_TYPE_FLOAT, value_transform_float); g_value_register_transform_func (G_TYPE_STRING, G_TYPE_DOUBLE, value_transform_double); g_value_register_transform_func (G_TYPE_STRING, G_TYPE_BOOLEAN, value_transform_boolean); + g_value_register_transform_func (G_TYPE_STRING, G_TYPE_ENUM, value_transform_enum); for (guint i = 0; i < argc; i++) { GMatchInfo *match; -- cgit v1.2.3