Settings.createAction

Creates a #GAction corresponding to a given #GSettings 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).

class Settings
createAction
(
string key
)

Parameters

key string

the name of a key in @settings

Return: a new #GAction

Meta

Since

2.32