Method

GioSettingsset_strv

since: 2.26

Declaration [src]

gboolean
g_settings_set_strv (
  GSettings* settings,
  const gchar* key,
  const gchar* const* value
)

Description [src]

Sets key in settings to value.

A convenience variant of g_settings_set() for string arrays. If value is NULL, then key is set to be the empty array.

It is a programmer error to give a key that isn’t specified as having an array of strings type in the schema for settings.

Available since: 2.26

Parameters

key

Type: const gchar*

The name of the key to set.

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

Type: An array of gchar*

The value to set it to, or NULL.

The argument can be NULL.
The array must be NULL-terminated.
The data is owned by the caller of the method.
Each element is a NUL terminated UTF-8 string.

Return value

Type: gboolean

TRUE if setting the key succeeded, FALSE if the key was not writable.