Method

GioSettingsset

since: 2.26

Declaration

gboolean
g_settings_set (
  GSettings* settings,
  const gchar* key,
  const gchar* format,
  ...
)

Description

Sets key in settings to value.

A convenience function that combines g_settings_set_value() with g_variant_new().

It is a programmer error to give a key that isn’t contained in the schema for settings or for the GVariantType of format to mismatch the type given in the schema.

Available since: 2.26

This method is not directly available to language bindings.

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.
format

Type: const gchar*

A GVariant format string.

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

Type: 

Arguments as per format.

Return value

Type: gboolean

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