Merge branch 'keyfile-docs' into 'main'

gkeyfile: Convert docs to gi-docgen linking syntax

See merge request GNOME/glib!4472
This commit is contained in:
Philip Withnall 2025-02-14 00:56:06 +00:00
commit c5d82f9099
2 changed files with 416 additions and 374 deletions

View File

@ -907,10 +907,12 @@ g_keyfile_settings_backend_class_init (GKeyfileSettingsBackendClass *class)
* GKeyfileSettingsBackend:root-path: * GKeyfileSettingsBackend:root-path:
* *
* All settings read to or written from the backend must fall under the * All settings read to or written from the backend must fall under the
* path given in @root_path (which must start and end with a slash and * path given in @root_path.
* not contain two consecutive slashes). @root_path may be "/".
* *
* Defaults to "/". * The path must start and end with a slash and not contain two consecutive
* slashes. It may be `"/"`.
*
* Defaults to `"/"`.
*/ */
g_object_class_install_property (object_class, g_object_class_install_property (object_class,
PROP_ROOT_PATH, PROP_ROOT_PATH,
@ -922,10 +924,10 @@ g_keyfile_settings_backend_class_init (GKeyfileSettingsBackendClass *class)
/** /**
* GKeyfileSettingsBackend:root-group: * GKeyfileSettingsBackend:root-group:
* *
* If @root_group is non-%NULL then it specifies the name of the keyfile * If @root_group is non-`NULL` then it specifies the name of the keyfile
* group used for keys that are written directly below the root path. * group used for keys that are written directly below the root path.
* *
* Defaults to NULL. * Defaults to `NULL`.
*/ */
g_object_class_install_property (object_class, g_object_class_install_property (object_class,
PROP_ROOT_GROUP, PROP_ROOT_GROUP,
@ -953,60 +955,60 @@ g_keyfile_settings_backend_class_init (GKeyfileSettingsBackendClass *class)
* g_keyfile_settings_backend_new: * g_keyfile_settings_backend_new:
* @filename: the filename of the keyfile * @filename: the filename of the keyfile
* @root_path: the path under which all settings keys appear * @root_path: the path under which all settings keys appear
* @root_group: (nullable): the group name corresponding to * @root_group: (nullable): the group name corresponding to @root_path, or
* @root_path, or %NULL * `NULL` to disallow storing keys directly beneath @root_path
* *
* Creates a keyfile-backed #GSettingsBackend. * Creates a keyfile-backed [class@Gio.SettingsBackend].
* *
* The filename of the keyfile to use is given by @filename. * The filename of the keyfile to use is given by @filename.
* *
* All settings read to or written from the backend must fall under the * All settings read to or written from the backend must fall under the
* path given in @root_path (which must start and end with a slash and * path given in @root_path (which must start and end with a slash and
* not contain two consecutive slashes). @root_path may be "/". * not contain two consecutive slashes). @root_path may be `"/"`.
* *
* If @root_group is non-%NULL then it specifies the name of the keyfile * If @root_group is non-`NULL` then it specifies the name of the keyfile
* group used for keys that are written directly below @root_path. For * group used for keys that are written directly below @root_path. For
* example, if @root_path is "/apps/example/" and @root_group is * example, if @root_path is `"/apps/example/"` and @root_group is
* "toplevel", then settings the key "/apps/example/enabled" to a value * `"toplevel"`, then setting the key `"/apps/example/enabled"` to true will
* of %TRUE will cause the following to appear in the keyfile: * cause the following to appear in the keyfile:
* *
* |[ * ```
* [toplevel] * [toplevel]
* enabled=true * enabled=true
* ]| * ```
* *
* If @root_group is %NULL then it is not permitted to store keys * If @root_group is `NULL` then it is not permitted to store keys
* directly below the @root_path. * directly below the @root_path.
* *
* For keys not stored directly below @root_path (ie: in a sub-path), * For keys not stored directly below @root_path (ie: in a sub-path),
* the name of the subpath (with the final slash stripped) is used as * the name of the subpath (with the final slash stripped) is used as
* the name of the keyfile group. To continue the example, if * the name of the keyfile group. To continue the example, if
* "/apps/example/profiles/default/font-size" were set to * `"/apps/example/profiles/default/font-size"` were set to
* 12 then the following would appear in the keyfile: * `12` then the following would appear in the keyfile:
* *
* |[ * ```
* [profiles/default] * [profiles/default]
* font-size=12 * font-size=12
* ]| * ```
* *
* The backend will refuse writes (and return writability as being * The backend will refuse writes (and return writability as being
* %FALSE) for keys outside of @root_path and, in the event that * false) for keys outside of @root_path and, in the event that
* @root_group is %NULL, also for keys directly under @root_path. * @root_group is `NULL`, also for keys directly under @root_path.
* Writes will also be refused if the backend detects that it has the * Writes will also be refused if the backend detects that it has the
* inability to rewrite the keyfile (ie: the containing directory is not * inability to rewrite the keyfile (ie: the containing directory is not
* writable). * writable).
* *
* There is no checking done for your key namespace clashing with the * There is no checking done for your key namespace clashing with the
* syntax of the key file format. For example, if you have '[' or ']' * syntax of the key file format. For example, if you have `[` or `]`
* characters in your path names or '=' in your key names you may be in * characters in your path names or `=` in your key names you may be in
* trouble. * trouble.
* *
* The backend reads default values from a keyfile called `defaults` in * The backend reads default values from a keyfile called `defaults` in
* the directory specified by the #GKeyfileSettingsBackend:defaults-dir property, * the directory specified by the `GKeyfileSettingsBackend:defaults-dir`
* and a list of locked keys from a text file with the name `locks` in * property, and a list of locked keys from a text file with the name `locks` in
* the same location. * the same location.
* *
* Returns: (transfer full): a keyfile-backed #GSettingsBackend * Returns: (transfer full): a keyfile-backed [class@Gio.SettingsBackend]
**/ **/
GSettingsBackend * GSettingsBackend *
g_keyfile_settings_backend_new (const gchar *filename, g_keyfile_settings_backend_new (const gchar *filename,

File diff suppressed because it is too large Load Diff