Skip to content

Resolve "Some GObect/GInterface properties broke"

Philip Chimento requested to merge ptomato/gjs:182-fix-properties into master

A regression from the property cache refactor caused properties like Gio.NetworkMonitor.network_available to disappear. This was because NetworkMonitor is an interface, implemented by a non-introspectable class, i.e. Gio.NetworkMonitor.get_default() gives you an instance of GNetworkMonitorBase which does not have introspection information.

To fix this, we iterate through all the interfaces implemented by a non-introspectable type, and check if the ID to be resolved is a property of one of them, and define it on the prototype if so. For this we factor out some code into separate functions, and change resolve_no_info() to have a parameter specifying whether to consider only methods or both methods and properties.

Closes: #182 (closed)

Merge request reports