[glib] GSettings docs: clarify what is a good path
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] GSettings docs: clarify what is a good path
- Date: Fri, 13 Apr 2012 00:05:28 +0000 (UTC)
commit 192892b52cbd13d4d3a09c1ca09c5ccdfe76d359
Author: Ryan Lortie <desrt desrt ca>
Date: Thu Apr 12 20:04:32 2012 -0400
GSettings docs: clarify what is a good path
Add an explicit note to the docs about choosing paths based on domain
names, not ones like "/apps/", "/desktop/" or "/system/".
gio/gsettings.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/gio/gsettings.c b/gio/gsettings.c
index 7db7196..219630b 100644
--- a/gio/gsettings.c
+++ b/gio/gsettings.c
@@ -69,6 +69,14 @@
* useful e.g. when the schema describes an 'account', and you want to be
* able to store a arbitrary number of accounts.
*
+ * Paths must start with and end with a forward slash character ('/')
+ * and must not contain two sequential slash characters. Paths should
+ * be chosen based on a domain name associated with the program or
+ * library to which the settings belong. Examples of paths are
+ * "/org/gtk/settings/file-chooser/" and "/ca/desrt/dconf-editor/".
+ * Paths should not start with "/apps/", "/desktop/" or "/system/" as
+ * they often did in GConf.
+ *
* Unlike other configuration systems (like GConf), GSettings does not
* restrict keys to basic types like strings and numbers. GSettings stores
* values as #GVariant, and allows any #GVariantType for keys. Key names
@@ -114,7 +122,7 @@
* <example id="schema-default-values"><title>Default values</title>
* <programlisting><![CDATA[
* <schemalist>
- * <schema id="org.gtk.Test" path="/tests/" gettext-domain="test">
+ * <schema id="org.gtk.Test" path="/org/gtk/Test/" gettext-domain="test">
*
* <key name="greeting" type="s">
* <default l10n="messages">"Hello, earthlings"</default>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]