diff --git a/clutter/clutter-layout-manager.c b/clutter/clutter-layout-manager.c index 3bb196a0c..9538b96e3 100644 --- a/clutter/clutter-layout-manager.c +++ b/clutter/clutter-layout-manager.c @@ -156,13 +156,12 @@ * ClutterAllocationFlags flags) * { * MyLayoutManager *self = MY_LAYOUT_MANAGER (manager); - * GList *children, *l; + * ClutterActor *child; * - * children = clutter_container_get_children (container); - * - * for (l = children; l != NULL; l = l->next) + * for (child = clutter_actor_get_first_child (CLUTTER_ACTOR (container)); + * child != NULL; + * child = clutter_actor_get_next_sibling (child)) * { - * ClutterActor *child = l->data; * ClutterLayoutMeta *meta; * MyLayoutMeta *my_meta; * @@ -223,8 +222,6 @@ * /* allocate the child */ * clutter_actor_allocate (child, &child_box, flags); * } - * - * g_list_free (children); * } * * diff --git a/clutter/clutter-script-parser.c b/clutter/clutter-script-parser.c index 625f20493..d3e120617 100644 --- a/clutter/clutter-script-parser.c +++ b/clutter/clutter-script-parser.c @@ -1832,20 +1832,19 @@ _clutter_script_check_unresolved (ClutterScript *script, ClutterActor *parent; parent = clutter_actor_get_parent (CLUTTER_ACTOR (oinfo->object)); - if (parent != NULL && CLUTTER_IS_CONTAINER (parent)) + if (parent != NULL) { ClutterContainer *container = CLUTTER_CONTAINER (parent); - GList *children, *l; + ClutterActor *child; - children = clutter_container_get_children (container); - - for (l = children; l != NULL; l = l->next) + for (child = clutter_actor_get_first_child (parent); + child != NULL; + child = clutter_actor_get_next_sibling (child)) { - GObject *child = l->data; ObjectInfo *child_info; const gchar *id_; - id_ = clutter_get_script_id (child); + id_ = clutter_get_script_id (G_OBJECT (child)); if (id_ == NULL || *id_ == '\0') continue; @@ -1854,14 +1853,12 @@ _clutter_script_check_unresolved (ClutterScript *script, continue; apply_child_properties (script, container, - CLUTTER_ACTOR (child), + child, child_info); apply_layout_properties (script, container, - CLUTTER_ACTOR (child), + child, child_info); } - - g_list_free (children); } }