2007-02-18 Matthew Allum <mallum@openedhand.com>
authorMatthew Allum <mallum@openedhand.com>
Sun, 18 Feb 2007 00:14:19 +0000 (00:14 +0000)
committerMatthew Allum <mallum@openedhand.com>
Sun, 18 Feb 2007 00:14:19 +0000 (00:14 +0000)
        * 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
clutter/clutter-actor.c
clutter/clutter-group.c

index 705c2ae..3a526f4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        * clutter/clutter-group.h:
index e34a613..1c2da67 100644 (file)
@@ -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);
index 489c735..9b5b154 100644 (file)
@@ -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);
 }
 
 /**