Gio.Settings.prototype.set_value

function set_value(key: String, value: GLib.Variant): Boolean {
    // Gjs wrapper for g_settings_set_value()
}
  

Sets key in settings to value.

It is a programmer error to give a key that isn't contained in the schema for settings or for value to have the incorrect type, per the schema.

If value is floating then this function consumes the reference.

Since 2.26

key

the name of the key to set

value

a GLib.Variant of the correct type

Returns

true if setting the key succeeded, false if the key was not writable