2007-11-14 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-scriptable.[ch]: Rename ::set_name and ::get_name to ::set_id and ::get_id, to avoid potential confusion with the ClutterActor:name property. * clutter/clutter-script.h: * clutter/clutter-script.c (clutter_script_construct_object): Use clutter_scriptable_set_id(). (clutter_get_script_id): Add a public function to retrieve the ID used in the UI definition files from an object. * clutter/clutter-actor.c: Do not set the name of the actor with the ID set in the UI definition files. * tests/test-script.c: Test clutter_get_script_id(). * clutter.symbols: Update with the new symbols.
This commit is contained in:
@ -66,6 +66,7 @@ blue_button_press (ClutterActor *actor,
|
||||
ClutterButtonEvent *event,
|
||||
gpointer data)
|
||||
{
|
||||
g_print ("[*] Pressed `%s'\n", clutter_get_script_id (G_OBJECT (actor)));
|
||||
g_print ("[*] Unmerging objects with merge id: %d\n", merge_id);
|
||||
|
||||
clutter_script_unmerge_objects (script, merge_id);
|
||||
@ -80,6 +81,8 @@ red_button_press (ClutterActor *actor,
|
||||
{
|
||||
GObject *timeline;
|
||||
|
||||
g_print ("[*] Pressed `%s'\n", clutter_get_script_id (G_OBJECT (actor)));
|
||||
|
||||
timeline = clutter_script_get_object (script, "main-timeline");
|
||||
g_assert (CLUTTER_IS_TIMELINE (timeline));
|
||||
|
||||
|
Reference in New Issue
Block a user