Bug 1395 - apply and get_nth_actor are inconsistent
authorEmmanuele Bassi <ebassi@linux.intel.com>
Fri, 23 Jan 2009 16:22:02 +0000 (16:22 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Sat, 24 Jan 2009 14:32:09 +0000 (14:32 +0000)
commit171a7647b916ee0c12d1494ba47921f3cd783c53
tree87bd9a7d12b363f9dabdaa745e9ef89fc5a96d07
parentba068f6bc9f15aafc6d1af3526fc101634b978ac
Bug 1395 - apply and get_nth_actor are inconsistent

When calling clutter_behaviour_apply() the new actor is prepended
to the list of actors to which a behaviour is applied; this breaks
the rest of methods working on the actors list, e.g.:

  # adding actors
  apply(actor_0);
  apply(actor_1);
  apply(actor_2);

  # expected: [ actor_0, actor_1, actor_2 ]
  [ actor_2, actor_1, actor_0 ] = get_actors();

  # expected: actor_2
  actor_0 = get_nth_actor(2);

This commit fixes the inconsistency in the returned values.
clutter/clutter-behaviour.c