mirror of
https://github.com/brl/mutter.git
synced 2024-11-10 07:56:14 -05:00
script: Always allow setting object properties by id reference
The block that allows setting a GObject property holding an object instance is conditionally depending on the USE_PIXBUF define. This makes it impossible to reference an object inside ClutterScript on platforms not using GdkPixbuf.
This commit is contained in:
parent
ef8ae7d72f
commit
50aec3c540
@ -1103,21 +1103,25 @@ clutter_script_parse_node (ClutterScript *script,
|
||||
g_free (path);
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
if (G_VALUE_HOLDS (&node_value, G_TYPE_STRING))
|
||||
{
|
||||
if (G_VALUE_HOLDS (&node_value, G_TYPE_STRING))
|
||||
const gchar *str = g_value_get_string (&node_value);
|
||||
GObject *object = clutter_script_get_object (script, str);
|
||||
if (object)
|
||||
{
|
||||
const gchar *str = g_value_get_string (&node_value);
|
||||
GObject *object = clutter_script_get_object (script, str);
|
||||
if (object)
|
||||
{
|
||||
g_value_set_object (value, object);
|
||||
retval = TRUE;
|
||||
}
|
||||
CLUTTER_NOTE (SCRIPT,
|
||||
"Assigning '%s' (%s) to property '%s'",
|
||||
str,
|
||||
G_OBJECT_TYPE_NAME (object),
|
||||
name);
|
||||
|
||||
g_value_set_object (value, object);
|
||||
retval = TRUE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
default:
|
||||
retval = FALSE;
|
||||
@ -1179,6 +1183,7 @@ clutter_script_translate_parameters (ClutterScript *script,
|
||||
|
||||
if (!res)
|
||||
{
|
||||
CLUTTER_NOTE (SCRIPT, "Property '%s' ignored", pinfo->name);
|
||||
unparsed = g_list_prepend (unparsed, pinfo);
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user