1
0
Fork 0

script-parser: Be more strict with "children" members

The "children" member for Container definitions should only reference
actors, and warn about any other type.
This commit is contained in:
Emmanuele Bassi 2010-02-25 14:20:05 +00:00
parent c291d5a660
commit c0be19eff6

View file

@ -1669,6 +1669,18 @@ add_children (ClutterScript *script,
continue;
}
if (!CLUTTER_IS_ACTOR (object))
{
g_warning ("The object definition '%s' (type: %s) is not "
"an actor, but it is referenced in the 'children' "
"member of the container '%s' (type: %s); skipping.",
child_info->id,
g_type_name (child_info->gtype),
oinfo->id,
g_type_name (oinfo->gtype));
continue;
}
CLUTTER_NOTE (SCRIPT, "Adding children '%s' to actor of type '%s'",
name,
g_type_name (G_OBJECT_TYPE (container)));