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
This commit is contained in:
Bastian Winkler 2010-02-24 16:32:19 +01:00 committed by Emmanuele Bassi
parent fd6f670743
commit 59fd7e4a81

View File

@ -1294,7 +1294,11 @@ parse_animator_property (JsonArray *array,
return; 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); for (k = json_array_get_elements (keys);
k != NULL; k != NULL;
k = k->next) k = k->next)
@ -1336,7 +1340,6 @@ parse_animator_property (JsonArray *array,
valid_keys = g_slist_prepend (valid_keys, animator_key); 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)); g_value_set_pointer (clos->value, g_slist_reverse (valid_keys));
clos->result = TRUE; clos->result = TRUE;