mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
cally: Use Actor.get_children()
Instead of the Container method, given that the new get_children() gives us more actors by default.
This commit is contained in:
parent
b42f17b2dc
commit
1979faee00
@ -295,10 +295,7 @@ cally_actor_initialize (AtkObject *obj,
|
||||
g_object_set_data (G_OBJECT (obj), "atk-component-layer",
|
||||
GINT_TO_POINTER (ATK_LAYER_MDI));
|
||||
|
||||
/* Depends if the object implement ClutterContainer */
|
||||
if (CLUTTER_IS_CONTAINER(actor))
|
||||
{
|
||||
priv->children = clutter_container_get_children (CLUTTER_CONTAINER (actor));
|
||||
priv->children = clutter_actor_get_children (actor);
|
||||
|
||||
/*
|
||||
* We store the handler ids for these signals in case some objects
|
||||
@ -319,12 +316,6 @@ cally_actor_initialize (AtkObject *obj,
|
||||
|
||||
obj->role = ATK_ROLE_PANEL; /* typically objects implementing ClutterContainer
|
||||
interface would be a panel */
|
||||
}
|
||||
else
|
||||
{
|
||||
priv->children = NULL;
|
||||
obj->role = ATK_ROLE_UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
@ -674,8 +665,7 @@ cally_actor_real_add_actor (ClutterActor *container,
|
||||
|
||||
g_list_free (priv->children);
|
||||
|
||||
priv->children =
|
||||
clutter_container_get_children (CLUTTER_CONTAINER(container));
|
||||
priv->children = clutter_actor_get_children (CLUTTER_ACTOR (container));
|
||||
|
||||
index = g_list_index (priv->children, actor);
|
||||
g_signal_emit_by_name (atk_parent, "children_changed::add",
|
||||
@ -717,7 +707,8 @@ cally_actor_real_remove_actor (ClutterActor *container,
|
||||
priv = CALLY_ACTOR (atk_parent)->priv;
|
||||
index = g_list_index (priv->children, actor);
|
||||
g_list_free (priv->children);
|
||||
priv->children = clutter_container_get_children (CLUTTER_CONTAINER(container));
|
||||
|
||||
priv->children = clutter_actor_get_children (CLUTTER_ACTOR (container));
|
||||
|
||||
if (index >= 0 && index <= g_list_length (priv->children))
|
||||
g_signal_emit_by_name (atk_parent, "children_changed::remove",
|
||||
|
Loading…
Reference in New Issue
Block a user