From 59fd7e4a810f51bad31c2eafb609d545557ef264 Mon Sep 17 00:00:00 2001 From: Bastian Winkler Date: Wed, 24 Feb 2010 16:32:19 +0100 Subject: [PATCH] animator: Append parsed animator keys to previously parsed ones Reuse the GSList of the previously parsed property when building a ClutterAnimator from script, otherwise only the last used property will be used http://bugzilla.openedhand.com/show_bug.cgi?id=2003 --- clutter/clutter-animator.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/clutter/clutter-animator.c b/clutter/clutter-animator.c index cbf2d219a..679bf149a 100644 --- a/clutter/clutter-animator.c +++ b/clutter/clutter-animator.c @@ -1294,7 +1294,11 @@ parse_animator_property (JsonArray *array, return; } - valid_keys = NULL; + if (G_IS_VALUE (clos->value)) + valid_keys = g_slist_reverse (g_value_get_pointer (clos->value)); + else + g_value_init (clos->value, G_TYPE_POINTER); + for (k = json_array_get_elements (keys); k != NULL; k = k->next) @@ -1336,7 +1340,6 @@ parse_animator_property (JsonArray *array, valid_keys = g_slist_prepend (valid_keys, animator_key); } - g_value_init (clos->value, G_TYPE_POINTER); g_value_set_pointer (clos->value, g_slist_reverse (valid_keys)); clos->result = TRUE;