Gio.Settings.bind_writable

### Method

# Gio Settingsbind_writable

since: 2.26

#### Declaration [src]

    void
    g_settings_bind_writable (
      GSettings* settings,
      const gchar* key,
      GObject* object,
      const gchar* property,
      gboolean inverted
    )

#### Description [src]

Create a binding between the writability of `key` in the `settings` object and the property `property` of `object`. The property must be boolean; “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, i.e. `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.

Available since: 2.26

#### Parameters

`key`

  Type: `const gchar*`

  The key to bind.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`object`

  Type: `GObject`

  A `GObject`.

  The data is owned by the caller of the method.

`property`

  Type: `const gchar*`

  The name of a boolean property to bind.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`inverted`

  Type: `gboolean`

  Whether to ‘invert’ the value.