GObject.Object
Gio.Settings
Import line: | Gio = imports.gi.Gio; |
GIR File: | Gio-2.0.gir |
C documentation: | GSettings |
Class : | Settings |
Extends: | GObject.Object |
Properties | Defined By | |
---|---|---|
delay_apply : gboolean
read only
Whether the GSettings object is in 'delay-apply' mode.
Whether the GSettings object is in 'delay-apply' mode. See
g_settings_delay() for details. |
Gio.Settings | |
has_unapplied : gboolean
read only
If this property is TRUE, the GSettings object has outstanding
changes that will be applied when g_settings_apply() is called. If this property is TRUE, the GSettings object has outstanding
changes that will be applied when g_settings_apply() is called. |
Gio.Settings | |
parent_instance : GObject.Object
read only
|
Gio.Settings | |
path : String
The path within the backend where the settings are stored.
The path within the backend where the settings are stored.
|
Gio.Settings | |
priv : Gio.SettingsPrivate
read only
|
Gio.Settings | |
schema : String
The name of the schema that describes the types of keys
for this GSettings object. The name of the schema that describes the types of keys
for this GSettings object. |
Gio.Settings |
Method / Constructor | Defined By | |
---|---|---|
new Gio.Settings
(Object properties)
Create a new Gio.Settings
Create a new Gio.Settings
|
||
Create a new Gio.Settings
Create a new Gio.Settings
|
||
Create a new Gio.Settings
Create a new Gio.Settings
|
||
new Gio.Settings.with_backend_and_path
(String schema, SettingsBackend backend, String path)
:
Gio.Settings
Create a new Gio.Settings
Create a new Gio.Settings
|
||
Create a new Gio.Settings
Create a new Gio.Settings
|
||
Gio.Settings.list_relocatable_schemas
()
:
Array
Gets a list of the relocatable GSettings schemas installed on the
system.
Gets a list of the relocatable GSettings schemas installed on the
system. These are schemas that do not provide their own path. It is usual to instantiate these schemas directly, but if you want to you can use g_settings_new_with_path() to specify the path. The output of this function, tTaken together with the output of g_settings_list_schemas() represents the complete list of all installed schemas. GSettings schemas that are available. The list must not be modified or freed.
|
Gio.Settings | |
Gio.Settings.list_schemas
()
:
Array
Gets a list of the GSettings schemas installed on the system.
Gets a list of the GSettings schemas installed on the system. The
returned list is exactly the list of schemas for which you may call g_settings_new() without adverse effects. This function does not list the schemas that do not provide their own g_settings_new_with_path()). See g_settings_list_relocatable_schemas() for that. schemas that are available. The list must not be modified or freed.
|
Gio.Settings | |
Gio.Settings.sync
()
:
none
Ensures that all pending operations for the given are complete for
the default backend.
Ensures that all pending operations for the given are complete for
the default backend. Writes made to a GSettings are handled asynchronously. For this reason, it is very unlikely that the changes have it to disk by the time g_settings_set() returns. This call will block until all of the writes have made it to the backend. Since the mainloop is not running, no change notifications will be dispatched during this call (but some may be queued by the time the call is done).
|
Gio.Settings | |
Removes an existing binding for property on object.
Removes an existing binding for property on object.
Note that bindings are automatically removed when the object is finalized, so it is rarely necessary to call this function.
|
Gio.Settings | |
apply
()
:
none
Applies any changes that have been made to the settings.
Applies any changes that have been made to the settings. This
function does nothing unless settings is in 'delay-apply' mode; see g_settings_delay(). In the normal case settings are always applied immediately.
|
Gio.Settings | |
Create a binding between the key in the settings object
and the property property of object.
Create a binding between the key in the settings object
and the property property of object. The binding uses the default GIO mapping functions to map between the settings and property values. These functions handle booleans, numeric types and string types in a straightforward way. Use g_settings_bind_with_mapping() if you need a custom mapping, or map between types that are not supported by the default mapping functions. Unless the flags include G_SETTINGS_BIND_NO_SENSITIVITY, this function also establishes a binding between the writability of a boolean property by that name). See g_settings_bind_writable() for more details about writable bindings. Note that the lifecycle of the binding is tied to the object, and that you can have only one binding per object property. If you bind the same property twice on the same object, the second binding overrides the first one.
|
Gio.Settings | |
Create a binding between the writability of key in the
The property must be boolean; "sensitive" or "visible" properties of widgets are the most likely candidates.
Create a binding between the writability of key in the
The property must be boolean; "sensitive" or "visible" properties of widgets are the most likely candidates. Writable bindings are always uni-directional; changes of the writability of the setting will be propagated to the object property, not the other way. When the inverted argument is TRUE, the binding inverts the value as it passes from the setting to the object, i.e. property will be set to TRUE if the key is writable. Note that the lifecycle of the binding is tied to the object, and that you can have only one binding per object property. If you bind the same property twice on the same object, the second binding overrides the first one.
|
Gio.Settings | |
delay
()
:
none
Changes the GSettings object into 'delay-apply' mode.
Changes the GSettings object into 'delay-apply' mode. In this
mode, changes to settings are not immediately propagated to the backend, but kept locally until g_settings_apply() is called.
|
Gio.Settings | |
Gets the value that is stored at key in settings.
Gets the value that is stored at key in settings.
A convenience variant of g_settings_get() for booleans. It is a programmer error to give a key that isn't specified as having a boolean type in the schema for settings.
|
Gio.Settings | |
get_child
(String name)
:
Gio.Settings
Creates a 'child' settings object which has a base path of
Creates a 'child' settings object which has a base path of
The schema for the child settings object must have been declared in the schema of settings using a
|
Gio.Settings | |
Gets the value that is stored at key in settings.
Gets the value that is stored at key in settings.
A convenience variant of g_settings_get() for doubles. It is a programmer error to give a key that isn't specified as having a 'double' type in the schema for settings.
|
Gio.Settings | |
Gets the value that is stored in settings for key and converts it
to the enum value that it represents.
Gets the value that is stored in settings for key and converts it
to the enum value that it represents. In order to use this function the type of the value must be a string and it must be marked in the schema file as an enumerated type. It is a programmer error to give a key that isn't contained in the schema for settings or is not marked as an enumerated type. If the value stored in the configuration database is not a valid value for the enumerated type then this function will return the default value.
|
Gio.Settings | |
Gets the value that is stored in settings for key and converts it
to the flags value that it represents.
Gets the value that is stored in settings for key and converts it
to the flags value that it represents. In order to use this function the type of the value must be an array of strings and it must be marked in the schema file as an flags type. It is a programmer error to give a key that isn't contained in the schema for settings or is not marked as a flags type. If the value stored in the configuration database is not a valid value for the flags type then this function will return the default value.
|
Gio.Settings | |
get_has_unapplied
()
:
gboolean
Returns whether the GSettings object has any unapplied
changes.
Returns whether the GSettings object has any unapplied
changes. This can only be the case if it is in 'delayed-apply' mode.
|
Gio.Settings | |
Gets the value that is stored at key in settings.
Gets the value that is stored at key in settings.
A convenience variant of g_settings_get() for 32-bit integers. It is a programmer error to give a key that isn't specified as having a int32 type in the schema for settings.
|
Gio.Settings | |
Gets the value that is stored at key in settings, subject to
application-level validation/mapping.
Gets the value that is stored at key in settings, subject to
application-level validation/mapping. You should use this function when the application needs to perform some processing on the value of the key (for example, parsing). The indicates that the processing was unsuccessful (due to a parse error, for example) then the mapping is tried again with another value. This allows a robust 'fall back to defaults' behaviour to be implemented somewhat automatically. The first value that is tried is the user's setting for the key. If the mapping function fails to map this value, other values may be tried in an unspecified order (system or site defaults, translated schema default values, untranslated schema default values, etc). If the mapping function fails for all possible values, one additional If the mapping function still indicates failure at this point then the application will be aborted. The result parameter for the mapping function is pointed to a gpointer which is initially set to NULL. The same pointer is given to each invocation of mapping. The final value of that gpointer is what is returned by this function. NULL is valid; it is returned just as any other value would be.
|
Gio.Settings | |
get_range
(String key)
:
GLib.Variant
Queries the range of a key.
Queries the range of a key.
This function will return a GVariant that fully describes the range of values that are valid for key. The type of GVariant returned is string describes the type of range restriction in effect. The type and meaning of the value contained in the variant depends on the string. If the string is an empty array. The element type of that empty array is the expected type of value and all values of that type are valid. If the string is an array enumerating the possible values. Each item in the array is a possible valid value and no other values are valid. If the string is an array. Each item in the array is a value that may appear zero or one times in an array to be used as the value for this key. For example, if the variant contained the array 'y'] Finally, if the string is contains a pair of like-typed values -- the minimum and maximum permissible values for this key. This information should not be used by normal programs. It is considered to be a hint for introspection purposes. Normal programs should already know what is permitted by their own schema. The format may change in any way in the future -- but particularly, new forms may be added to the possibilities described above. It is a programmer error to give a key that isn't contained in the schema for settings. You should free the returned value with g_variant_unref() when it is no longer needed.
|
Gio.Settings | |
Gets the value that is stored at key in settings.
Gets the value that is stored at key in settings.
A convenience variant of g_settings_get() 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.
|
Gio.Settings | |
A convenience variant of g_settings_get() for string arrays.
A convenience variant of g_settings_get() for string arrays.
It is a programmer error to give a key that isn't specified as having an array of strings type in the schema for settings.
|
Gio.Settings | |
get_value
(String key)
:
GLib.Variant
Gets the value that is stored in settings for key.
Gets the value that is stored in settings for key.
It is a programmer error to give a key that isn't contained in the schema for settings.
|
Gio.Settings | |
Gio.Settings | ||
list_children
()
:
Array
Gets the list of children on settings.
Gets the list of children on settings.
The list is exactly the list of strings for which it is not an error to call g_settings_get_child(). For GSettings objects that are lists, this value can change at any time and you should connect to the "children-changed" signal to watch request a child after listing it only for it to have been destroyed in the meantime. For this reason, g_settings_get_child() may return NULL even for a child that was listed by this function. For GSettings objects that are not lists, you should probably not be calling this function from "normal" code (since you should already know what children are in your schema). This function may still be useful there for introspection reasons, however. You should free the return value with g_strfreev() when you are done with it.
|
Gio.Settings | |
list_keys
()
:
Array
Introspects the list of keys on settings.
Introspects the list of keys on settings.
You should probably not be calling this function from "normal" code (since you should already know what keys are in your schema). This function is intended for introspection reasons. You should free the return value with g_strfreev() when you are done with it.
|
Gio.Settings | |
Checks if the given value is of the correct type and within the
permitted range for key.
Checks if the given value is of the correct type and within the
permitted range for key. This API is not intended to be used by normal programs -- they should already know what is permitted by their own schemas. This API is meant to be used by programs such as editors or commandline tools. It is a programmer error to give a key that isn't contained in the schema for settings.
|
Gio.Settings | |
reset
(String key)
:
none
Resets key to its default value.
Resets key to its default value.
This call resets the key, as much as possible, to its default value. That might the value specified in the schema or the one set by the administrator.
|
Gio.Settings | |
revert
()
:
none
Reverts all non-applied changes to the settings.
Reverts all non-applied changes to the settings. This function
does nothing unless settings is in 'delay-apply' mode; see g_settings_delay(). In the normal case settings are always applied immediately. Change notifications will be emitted for affected keys.
|
Gio.Settings | |
Sets key in settings to value.
Sets key in settings to value.
A convenience variant of g_settings_set() for booleans. It is a programmer error to give a key that isn't specified as having a boolean type in the schema for settings.
|
Gio.Settings | |
Sets key in settings to value.
Sets key in settings to value.
A convenience variant of g_settings_set() for doubles. It is a programmer error to give a key that isn't specified as having a 'double' type in the schema for settings.
|
Gio.Settings | |
Looks up the enumerated type nick for value and writes it to key,
within settings.
Looks up the enumerated type nick for value and writes it to key,
within settings. It is a programmer error to give a key that isn't contained in the schema for settings or is not marked as an enumerated type, or for After performing the write, accessing key directly with g_settings_get_string() will return the 'nick' associated with
|
Gio.Settings | |
Looks up the flags type nicks for the bits specified by value, puts
them in an array of strings and writes the array to key, withing It is a programmer error to give a key that isn't contained in the schema for settings or is not marked as a flags type, or for value to contain any bits that are not value for the named type.
Looks up the flags type nicks for the bits specified by value, puts
them in an array of strings and writes the array to key, withing It is a programmer error to give a key that isn't contained in the schema for settings or is not marked as a flags type, or for value to contain any bits that are not value for the named type. After performing the write, accessing key directly with g_settings_get_strv() will return an array of 'nicks'; one for each bit in value.
|
Gio.Settings | |
Sets key in settings to value.
Sets key in settings to value.
A convenience variant of g_settings_set() for 32-bit integers. It is a programmer error to give a key that isn't specified as having a int32 type in the schema for settings.
|
Gio.Settings | |
Sets key in settings to value.
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.
|
Gio.Settings | |
Sets key in settings to value.
Sets key in settings to value.
A convenience variant of g_settings_set() for string arrays. If It is a programmer error to give a key that isn't specified as having an array of strings type in the schema for settings.
|
Gio.Settings | |
Sets key in settings to 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.
|
Gio.Settings |
Event | Defined By | |
---|---|---|
The "change-event" signal is emitted once per change event that
affects this settings object.
The "change-event" signal is emitted once per change event that
affects this settings object. You should connect to this signal only if you are interested in viewing groups of changes before they are split out into multiple emissions of the "changed" signal. For most use cases it is more appropriate to use the "changed" signal. In the event that the change event applies to one or more specified keys, keys will be an array of GQuark of length n_keys. In the event that the change event applies to the GSettings object as a be NULL and n_keys will be 0. The default handler for this signal invokes the "changed" signal for each affected key. If any other connected handler returns TRUE then this default functionality will be supressed.
|
Gio.Settings | |
The "changed" signal is emitted when a key has potentially changed.
The "changed" signal is emitted when a key has potentially changed.
You should call one of the g_settings_get() calls to check the new value. This signal supports detailed connections. You can connect to the detailed signal "changed::x" in order to only receive callbacks when key "x" changes.
|
Gio.Settings | |
The "writable-change-event" signal is emitted once per writability
change event that affects this settings object.
The "writable-change-event" signal is emitted once per writability
change event that affects this settings object. You should connect to this signal if you are interested in viewing groups of changes before they are split out into multiple emissions of the "writable-changed" signal. For most use cases it is more appropriate to use the "writable-changed" signal. In the event that the writability change applies only to a single key, key will be set to the GQuark for that key. In the event that the writability change affects the entire settings object, The default handler for this signal invokes the "writable-changed" and "changed" signals for each affected key. This is done because changes in writability might also imply changes in value (if for example, a new mandatory setting is introduced). If any other connected handler returns TRUE then this default functionality will be supressed.
|
Gio.Settings | |
The "writable-changed" signal is emitted when the writability of a
key has potentially changed.
The "writable-changed" signal is emitted when the writability of a
key has potentially changed. You should call g_settings_is_writable() in order to determine the new status. This signal supports detailed connections. You can connect to the detailed signal "writable-changed::x" in order to only receive callbacks when the writability of "x" changes.
|
Gio.Settings |