2007-10-09 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-script.c (clutter_script_get_object): Construct the requested object if it hasn't been already. This allows referencing objects within the same snippet. * tests/test-script.c: Declare a timeline and use it inside multiple behaviours; apply multiple behaviours to various actors, then retrieve the timeline to start it when the test runs.
This commit is contained in:
@ -196,12 +196,14 @@ resolve_alpha_func (const gchar *name)
|
||||
{
|
||||
c = name[i];
|
||||
/* skip if uppercase, first or previous is uppercase */
|
||||
if ((c == g_ascii_toupper (c) &&
|
||||
if ((c == '-') ||
|
||||
(c == g_ascii_toupper (c) &&
|
||||
i > 0 && name[i-1] != g_ascii_toupper (name[i-1])) ||
|
||||
(i > 2 && name[i] == g_ascii_toupper (name[i]) &&
|
||||
name[i-1] == g_ascii_toupper (name[i-1]) &&
|
||||
name[i-2] == g_ascii_toupper (name[i-2])))
|
||||
g_string_append_c (symbol_name, '_');
|
||||
|
||||
g_string_append_c (symbol_name, g_ascii_tolower (c));
|
||||
}
|
||||
g_string_append (symbol_name, "_func");
|
||||
@ -210,7 +212,7 @@ resolve_alpha_func (const gchar *name)
|
||||
|
||||
if (!g_module_symbol (module, symbol, (gpointer)&func))
|
||||
func = NULL;
|
||||
|
||||
|
||||
g_free (symbol);
|
||||
|
||||
return func;
|
||||
@ -1145,7 +1147,7 @@ clutter_script_get_object (ClutterScript *script,
|
||||
if (!oinfo)
|
||||
return NULL;
|
||||
|
||||
return oinfo->object;
|
||||
return clutter_script_construct_object (script, oinfo);
|
||||
}
|
||||
|
||||
static GList *
|
||||
|
Reference in New Issue
Block a user