Commit c0be19ef authored by Emmanuele Bassi's avatar Emmanuele Bassi

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

The "children" member for Container definitions should only reference
actors, and warn about any other type.
parent c291d5a6
......@@ -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)));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment