[glib/new-gsettings] Add some advice for dealing with unset/default values.
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/new-gsettings] Add some advice for dealing with unset/default values.
- Date: Sat, 17 Apr 2010 04:14:14 +0000 (UTC)
commit 41c1f3dd2b698fc9b1540e5681b3f306869ef39a
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Apr 16 23:56:40 2010 -0400
Add some advice for dealing with unset/default values.
docs/reference/gio/migrating.xml | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/gio/migrating.xml b/docs/reference/gio/migrating.xml
index 046705c..166da1b 100644
--- a/docs/reference/gio/migrating.xml
+++ b/docs/reference/gio/migrating.xml
@@ -247,6 +247,17 @@ start_monitoring_trash (void)
</tgroup>
</table>
</para>
+ <para>
+ There is a pattern that is sometimes used for GConf, where a setting can have
+ explicit 'value A', explicit 'value B' or 'use the system default'. With GConf,
+ 'use the system default' is sometimes implemented by unsetting the user value.
+ </para>
+ <para>
+ This is not possible in GSettings, since it does not have API to determine if a value
+ is the default and does not let you unset values. The recommended way (and much
+ clearer) way in which this can be implemented in GSettings is to have a separate
+ 'use-system-default' boolean setting.
+ </para>
</section>
<section>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]