Gio.Settings.set_enum

### Method

# Gio Settingsset_enum

#### Declaration [src]

    gboolean
    g_settings_set_enum (
      GSettings* settings,
      const gchar* key,
      gint value
    )

#### Description [src]

Looks up the enumerated type nick for `value` and writes it to `key`, within `settings`.

It is a programmer error to give a `key` that isn’t contained in the schema for `settings` or is not marked as an enumerated type, or for `value` not to be a valid value for the named type.

After performing the write, accessing `key` directly with `g_settings_get_string()` will return the ‘nick’ associated with `value`.

#### Parameters

`key`

  Type: `const gchar*`

  A key, within `settings`.

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

`value`

  Type: `gint`

  An enumerated value.

#### Return value

Type: `gboolean`

`TRUE`, if the set succeeds.