From f4fc7284ebeaedfb60d9903b41177f59a4907b85 Mon Sep 17 00:00:00 2001 From: Bastian Winkler Date: Mon, 3 Jan 2011 16:15:17 +0100 Subject: [PATCH] script-parser: Also honor properties of type GType The script parser should also handle GType properties. http://bugzilla.clutter-project.org/show_bug.cgi?id=2513 --- clutter/clutter-script-parser.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/clutter/clutter-script-parser.c b/clutter/clutter-script-parser.c index 959d25a75..316617d23 100644 --- a/clutter/clutter-script-parser.c +++ b/clutter/clutter-script-parser.c @@ -1356,6 +1356,15 @@ clutter_script_parse_node (ClutterScript *script, break; } + if (G_VALUE_TYPE (value) == G_TYPE_GTYPE && + G_VALUE_HOLDS (&node_value, G_TYPE_STRING)) + { + const gchar *str = g_value_get_string (&node_value); + GType type = clutter_script_get_type_from_name (script, str); + g_value_set_gtype (value, type); + retval = TRUE; + } + g_value_unset (&node_value); break; }