GSettings: add getters for user/default value

Add two new APIs: g_settings_get_user_value() and
g_settings_get_default_value().   Together, these should allow the
inspection of all interesting cases of "is this key set?" and "what
would happen if I reset this key?"

https://bugzilla.gnome.org/show_bug.cgi?id=668233
This commit is contained in:
Ryan Lortie
2013-10-27 10:34:01 -07:00
parent 2d06dbeef1
commit bebdfb8e62
3 changed files with 109 additions and 0 deletions

View File

@@ -112,6 +112,13 @@ GLIB_AVAILABLE_IN_ALL
GVariant * g_settings_get_value (GSettings *settings,
const gchar *key);
GLIB_AVAILABLE_IN_2_40
GVariant * g_settings_get_user_value (GSettings *settings,
const gchar *key);
GLIB_AVAILABLE_IN_2_40
GVariant * g_settings_get_default_value (GSettings *settings,
const gchar *key);
GLIB_AVAILABLE_IN_ALL
gboolean g_settings_set (GSettings *settings,
const gchar *key,