2007-11-30 Emmanuele Bassi <ebassi@openedhand.com>

* clutter/clutter-actor.c (parse_units),
	(clutter_actor_parse_custom_node): Do not allow using percentages
	of the stage on the stage itself, as it makes little to no
	sense.

	* clutter/clutter-script.c:
	(clutter_script_construct_object): Rearrange code.

	* tests/test-script.json: Do not set the size of the stage, to
	test for the stage size percentage.
This commit is contained in:
Emmanuele Bassi
2007-11-30 14:36:07 +00:00
parent 640b9aa07b
commit 97631bffd5
4 changed files with 51 additions and 14 deletions

View File

@ -1244,6 +1244,15 @@ clutter_script_construct_object (ClutterScript *script,
g_array_free (construct_params, TRUE);
}
/* then we get the rest of the parameters, asking the object itself
* to translate them for us, if we cannot do that
*/
oinfo->properties = clutter_script_translate_parameters (script,
object,
oinfo->id,
oinfo->properties,
&params);
/* shortcut, to avoid typechecking every time */
if (CLUTTER_IS_SCRIPTABLE (object))
{
@ -1254,15 +1263,6 @@ clutter_script_construct_object (ClutterScript *script,
set_custom_property = TRUE;
}
/* then we get the rest of the parameters, asking the object itself
* to translate them for us, if we cannot do that
*/
oinfo->properties = clutter_script_translate_parameters (script,
object,
oinfo->id,
oinfo->properties,
&params);
/* consume all the properties we could translate in this pass */
for (i = 0; i < params->len; i++)
{