From 02d1f56310c768302e45ad7b0a0d445537f688e4 Mon Sep 17 00:00:00 2001 From: Matthew Allum Date: Sun, 18 Feb 2007 00:14:19 +0000 Subject: [PATCH] 2007-02-18 Matthew Allum * clutter/clutter-actor.c: (clutter_actor_reparent): Add a FIXME re calling clutter_group here. * clutter/clutter-group.c: Fix clutter_group_remove_all --- ChangeLog | 7 +++++++ clutter/clutter-actor.c | 2 ++ clutter/clutter-group.c | 13 ++++++++----- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 705c2ae28..3a526f4b6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-02-18 Matthew Allum + + * clutter/clutter-actor.c: (clutter_actor_reparent): + Add a FIXME re calling clutter_group here. + * clutter/clutter-group.c: + Fix clutter_group_remove_all + 2007-02-15 Matthew Allum * clutter/clutter-group.h: diff --git a/clutter/clutter-actor.c b/clutter/clutter-actor.c index e34a613b7..1c2da67e2 100644 --- a/clutter/clutter-actor.c +++ b/clutter/clutter-actor.c @@ -1829,6 +1829,8 @@ clutter_actor_reparent (ClutterActor *self, old_parent = self->priv->parent_actor; g_object_ref (self); + /* FIXME: below assumes only groups can reparent + */ clutter_group_remove (CLUTTER_GROUP (self->priv->parent_actor), self); clutter_group_add (CLUTTER_GROUP (new_parent), self); g_object_unref (self); diff --git a/clutter/clutter-group.c b/clutter/clutter-group.c index 489c7359f..9b5b154b0 100644 --- a/clutter/clutter-group.c +++ b/clutter/clutter-group.c @@ -506,16 +506,19 @@ clutter_group_remove (ClutterGroup *self, void clutter_group_remove_all (ClutterGroup *self) { - GList *l; + GList *child_item, *next; g_return_if_fail (CLUTTER_IS_GROUP (self)); - for (l = self->priv->children; l != NULL; l = l->next) - { - ClutterActor *child = l->data; + if ((child_item = self->priv->children) == NULL) + return; - clutter_group_remove (self, child); + do + { + next = g_list_next(child_item); + clutter_group_remove (self, CLUTTER_ACTOR(child_item->data)); } + while ((child_item = next) != NULL); } /**