mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -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",
|
g_object_set_data (G_OBJECT (obj), "atk-component-layer",
|
||||||
GINT_TO_POINTER (ATK_LAYER_MDI));
|
GINT_TO_POINTER (ATK_LAYER_MDI));
|
||||||
|
|
||||||
/* Depends if the object implement ClutterContainer */
|
priv->children = clutter_actor_get_children (actor);
|
||||||
if (CLUTTER_IS_CONTAINER(actor))
|
|
||||||
{
|
|
||||||
priv->children = clutter_container_get_children (CLUTTER_CONTAINER (actor));
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We store the handler ids for these signals in case some objects
|
* We store the handler ids for these signals in case some objects
|
||||||
@ -320,12 +317,6 @@ cally_actor_initialize (AtkObject *obj,
|
|||||||
obj->role = ATK_ROLE_PANEL; /* typically objects implementing ClutterContainer
|
obj->role = ATK_ROLE_PANEL; /* typically objects implementing ClutterContainer
|
||||||
interface would be a panel */
|
interface would be a panel */
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
priv->children = NULL;
|
|
||||||
obj->role = ATK_ROLE_UNKNOWN;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cally_actor_class_init (CallyActorClass *klass)
|
cally_actor_class_init (CallyActorClass *klass)
|
||||||
@ -674,8 +665,7 @@ cally_actor_real_add_actor (ClutterActor *container,
|
|||||||
|
|
||||||
g_list_free (priv->children);
|
g_list_free (priv->children);
|
||||||
|
|
||||||
priv->children =
|
priv->children = clutter_actor_get_children (CLUTTER_ACTOR (container));
|
||||||
clutter_container_get_children (CLUTTER_CONTAINER(container));
|
|
||||||
|
|
||||||
index = g_list_index (priv->children, actor);
|
index = g_list_index (priv->children, actor);
|
||||||
g_signal_emit_by_name (atk_parent, "children_changed::add",
|
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;
|
priv = CALLY_ACTOR (atk_parent)->priv;
|
||||||
index = g_list_index (priv->children, actor);
|
index = g_list_index (priv->children, actor);
|
||||||
g_list_free (priv->children);
|
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))
|
if (index >= 0 && index <= g_list_length (priv->children))
|
||||||
g_signal_emit_by_name (atk_parent, "children_changed::remove",
|
g_signal_emit_by_name (atk_parent, "children_changed::remove",
|
||||||
|
Loading…
Reference in New Issue
Block a user