Method

GioSettingsset_string

since: 2.26

Declaration

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

Description

Sets key in settings to value.

A convenience variant of g_settings_set() for strings.

It is a programmer error to give a key that isn’t specified as having a string 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 function.
The value is a NUL terminated UTF-8 string.
value

Type: const gchar*

The value to set it to.

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

Return value

Type: gboolean

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