Gio.Settings.prototype.create_action
function create_action(key: String): Gio.Action {
// Gjs wrapper for g_settings_create_action()
}
Creates a Gio.Action corresponding to a given Gio.Settings key.
The action has the same name as the key.
The value of the key becomes the state of the action and the action is enabled when the key is writable. Changing the state of the action results in the key being written to. Changes to the value or writability of the key cause appropriate change notifications to be emitted for the action.
For boolean-valued keys, action activations take no parameter and result in the toggling of the value. For all other types, activations take the new value for the key (which must have the correct type).
Since 2.32
- key
the name of a key in settings
- Returns
a new Gio.Action