### Method

# Gio Settings set_flags

#### Declaration

    gboolean
    g_settings_set_flags (
      GSettings* settings,
      const gchar* key,
      guint value
    )

#### Description

Looks up the flags type nicks for the bits specified by `value`, puts them in an array of strings and writes the array 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 a flags type, or for `value` to contain any bits that are not value for the named type.

After performing the write, accessing `key` directly with `g_settings_get_strv()` will return an array of ‘nicks’; one for each bit in `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: `guint`

  A flags value.

#### Return value

Type: `gboolean`

`TRUE`, if the set succeeds.