From bcd156e652d558d9d0e764f9556b9a45d100f939 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 26 Jan 2012 17:10:18 +0000 Subject: [PATCH] box: Use the ActorIter API And remove a useless override of the pick() virtual function while we're at it. https://bugzilla.gnome.org/show_bug.cgi?id=668669 --- clutter/deprecated/clutter-box.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/clutter/deprecated/clutter-box.c b/clutter/deprecated/clutter-box.c index 019dff10e..e31add932 100644 --- a/clutter/deprecated/clutter-box.c +++ b/clutter/deprecated/clutter-box.c @@ -128,6 +128,7 @@ clutter_box_real_get_paint_volume (ClutterActor *actor, ClutterPaintVolume *volume) { gboolean retval = FALSE; + ClutterActorIter iter; ClutterActor *child; /* if we have a background color, and an allocation, then we need to @@ -144,9 +145,8 @@ clutter_box_real_get_paint_volume (ClutterActor *actor, /* otherwise, union the paint volumes of our children, in case * any one of them decides to paint outside the parent's allocation */ - for (child = clutter_actor_get_first_child (actor); - child != NULL; - child = clutter_actor_get_next_sibling (child)) + clutter_actor_iter_init (&iter, actor); + while (clutter_actor_iter_next (&iter, &child)) { const ClutterPaintVolume *child_volume; @@ -162,22 +162,6 @@ clutter_box_real_get_paint_volume (ClutterActor *actor, return retval; } -static void -clutter_box_real_pick (ClutterActor *actor, - const ClutterColor *pick) -{ - ClutterActor *child; - - CLUTTER_ACTOR_CLASS (clutter_box_parent_class)->pick (actor, pick); - - for (child = clutter_actor_get_first_child (actor); - child != NULL; - child = clutter_actor_get_next_sibling (child)) - { - clutter_actor_paint (child); - } -} - static void clutter_box_set_property (GObject *gobject, guint prop_id, @@ -240,7 +224,6 @@ clutter_box_class_init (ClutterBoxClass *klass) g_type_class_add_private (klass, sizeof (ClutterBoxPrivate)); actor_class->get_paint_volume = clutter_box_real_get_paint_volume; - actor_class->pick = clutter_box_real_pick; gobject_class->set_property = clutter_box_set_property; gobject_class->get_property = clutter_box_get_property;