Package: gio

Function gio:settings-bind-writable

Lambda List

gio:settings-bind-writable (settings key object property inverted)

Arguments

settings -- a g:settings object
key -- a string for the key to bind
object -- a g:object object with the property to bind
property -- a string for the name of the boolean property to bind
inverted -- a boolean whether to invert the value

Details

Create a binding between the writability of key in the settings object and the property property of object. The property must be boolean. The "sensitive" or "visible" properties of widgets are the most likely candidates.

Writable bindings are always uni-directional. Changes of the writability of the setting will be propagated to the object property, not the other way.

When the inverted argument is true, the binding inverts the value as it passes from the setting to the object, that is, property will be set to true if the key is not writable.

Note that the lifecycle of the binding is tied to object, and that you can have only one binding per object property. If you bind the same property twice on the same object, the second binding overrides the first one.
 

See also

#2026-03-25