diff options
-rw-r--r-- | gsettings/dconfsettingsbackend.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/gsettings/dconfsettingsbackend.c b/gsettings/dconfsettingsbackend.c index 1725d16..c8273f9 100644 --- a/gsettings/dconfsettingsbackend.c +++ b/gsettings/dconfsettingsbackend.c @@ -44,10 +44,23 @@ dconf_settings_backend_read (GSettingsBackend *backend, gboolean default_value) { DConfSettingsBackend *dcsb = (DConfSettingsBackend *) backend; + GVariant *value; - /* XXX default value */ + if (default_value) + { + GQueue *read_through; + + /* Mark the key as having been reset when trying to do the read... */ + read_through = g_queue_new (); + g_queue_push_tail (read_through, dconf_changeset_new_write (key, NULL)); + value = dconf_engine_read (dcsb->engine, read_through, key); + g_queue_free_full (read_through, (GDestroyNotify) dconf_changeset_unref); + } + + else + value = dconf_engine_read (dcsb->engine, NULL, key); - return dconf_engine_read (dcsb->engine, NULL, key); + return value; } static gboolean |