st-widget: Don't explicitly check for ClutterContainer inheritance

Since all ClutterActors implement the ClutterContainer interface, there
isn't a case where this check could fail.

https://bugzilla.gnome.org/show_bug.cgi?id=670034
This commit is contained in:
Jasper St. Pierre 2012-02-15 06:51:27 -05:00
parent f19ee78fb2
commit fbcea03ab3

View File

@ -1722,18 +1722,17 @@ st_describe_actor (ClutterActor *actor)
if (name)
g_string_append_printf (desc, " \"%s\"", name);
if (!append_actor_text (desc, actor) && CLUTTER_IS_CONTAINER (actor))
if (!append_actor_text (desc, actor))
{
GList *children, *l;
/* Do a limited search of @actor's children looking for a label */
children = clutter_container_get_children (CLUTTER_CONTAINER (actor));
children = clutter_actor_get_children (actor);
for (l = children, i = 0; l && i < 20; l = l->next, i++)
{
if (append_actor_text (desc, l->data))
break;
else if (CLUTTER_IS_CONTAINER (l->data))
children = g_list_concat (children, clutter_container_get_children (l->data));
children = g_list_concat (children, clutter_actor_get_children (l->data));
}
g_list_free (children);
}