[clutter] box: Use the ActorIter API
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] box: Use the ActorIter API
- Date: Fri, 27 Jan 2012 11:56:59 +0000 (UTC)
commit 5c9c5d24b23a3ddb365bd4ce0c5e2014d89a412e
Author: Emmanuele Bassi <ebassi linux intel com>
Date: Thu Jan 26 17:10:18 2012 +0000
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 files changed, 3 insertions(+), 20 deletions(-)
---
diff --git a/clutter/deprecated/clutter-box.c b/clutter/deprecated/clutter-box.c
index 33ffacd..9585b85 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;
@@ -163,22 +163,6 @@ clutter_box_real_get_paint_volume (ClutterActor *actor,
}
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,
const GValue *value,
@@ -257,7 +241,6 @@ clutter_box_class_init (ClutterBoxClass *klass)
actor_class->destroy = clutter_box_real_destroy;
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]