inspector: allow object read-only properties in prop-editor

If we have a GObject property that is also a GObject, we should be able
to view additional information on that object (even if the param spec
is read-only).
This commit is contained in:
Christian Hergert 2015-05-05 12:19:10 -07:00
parent 07f4c9c315
commit fa6f956489

View File

@ -1592,6 +1592,14 @@ constructed (GObject *object)
can_modify = ((spec->flags & G_PARAM_WRITABLE) != 0 &&
(spec->flags & G_PARAM_CONSTRUCT_ONLY) == 0);
/*
* By reaching this, we already know the property is readable.
* Since all we can do for a GObject is dive down into it's properties and
* inspect bindings and such, pretend to be mutable.
*/
if (g_type_is_a (spec->value_type, G_TYPE_OBJECT))
can_modify = TRUE;
if (!can_modify)
return;