2007-02-18 Matthew Allum <mallum@openedhand.com>

* clutter/clutter-actor.c: (clutter_actor_reparent):
        Add a FIXME re calling clutter_group here.
        * clutter/clutter-group.c:
        Fix clutter_group_remove_all
This commit is contained in:
Matthew Allum 2007-02-18 00:14:19 +00:00
parent f68b04cad4
commit 02d1f56310
3 changed files with 17 additions and 5 deletions

View File

@ -1,3 +1,10 @@
2007-02-18 Matthew Allum <mallum@openedhand.com>
* 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 <mallum@openedhand.com> 2007-02-15 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-group.h: * clutter/clutter-group.h:

View File

@ -1829,6 +1829,8 @@ clutter_actor_reparent (ClutterActor *self,
old_parent = self->priv->parent_actor; old_parent = self->priv->parent_actor;
g_object_ref (self); g_object_ref (self);
/* FIXME: below assumes only groups can reparent
*/
clutter_group_remove (CLUTTER_GROUP (self->priv->parent_actor), self); clutter_group_remove (CLUTTER_GROUP (self->priv->parent_actor), self);
clutter_group_add (CLUTTER_GROUP (new_parent), self); clutter_group_add (CLUTTER_GROUP (new_parent), self);
g_object_unref (self); g_object_unref (self);

View File

@ -506,16 +506,19 @@ clutter_group_remove (ClutterGroup *self,
void void
clutter_group_remove_all (ClutterGroup *self) clutter_group_remove_all (ClutterGroup *self)
{ {
GList *l; GList *child_item, *next;
g_return_if_fail (CLUTTER_IS_GROUP (self)); g_return_if_fail (CLUTTER_IS_GROUP (self));
for (l = self->priv->children; l != NULL; l = l->next) if ((child_item = self->priv->children) == NULL)
{ return;
ClutterActor *child = l->data;
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);
} }
/** /**