GNOME Bugzilla – Bug 762899
libpeas should allow setting properties from prerequisite types
Last modified: 2017-03-25 04:29:31 UTC
Currently, if an extension interface has a prerequisite other than GObject, it might have additional properties. Unless these properties are "overridden" in the interface, they cannot be set during extension construction. In Builder, this has resulted in some nasty workarounds, especially when integrating with Vala (which expects set_*() vfuncs for interface properties).
Created attachment 322910 [details] [review] Consider all an interfaces potential properties An interface can have a prerequisite which is derived from GObject an as such is not an interface. ---- All prerequisites which are an interface were already being checked, now expand that to all GObject derived types.
Review of attachment 322910 [details] [review]: Go ahead. ::: tests/libpeas/introspection/introspection-prerequisite.c @@ +30,3 @@ +} IntrospectionPrerequisitePrivate; + +G_DEFINE_TYPE_WITH_PRIVATE (IntrospectionPrerequisite, in general I would go these days with G_DEFINE_TYPE and making it a final type. Though if you do it for consistency I am fine with it.
Created attachment 348202 [details] [review] Consider all an interfaces potential properties v2 This fixes an issue where multiple interfaces specify a GObject prerequisite. We now pick the descendant of the two GTypes.
Review of attachment 348202 [details] [review]: Thanks all looks good to me
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.