diff options
author | Matthias Clasen <mclasen@redhat.com> | 2010-04-22 20:20:36 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2010-04-22 20:22:20 -0400 |
commit | 1573fded60055196b5d9fbd068f69a8cc7e2416b (patch) | |
tree | fb882c6f6d6d94d7154e2817a449659896c82461 | |
parent | 2f65528b0f023c3388cf242d7caf2a18121eb107 (diff) | |
download | gconf-1573fded60055196b5d9fbd068f69a8cc7e2416b.tar.gz |
Fix key writability when key does not exist
If a key does not exist, it should be marked as writable, otherwise
widget will end up unsensitive when g_settings_bind*() is used.
Bug 616307.
-rw-r--r-- | gsettings/gconfsettingsbackend.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gsettings/gconfsettingsbackend.c b/gsettings/gconfsettingsbackend.c index e76a3a37..77e8df86 100644 --- a/gsettings/gconfsettingsbackend.c +++ b/gsettings/gconfsettingsbackend.c @@ -799,12 +799,19 @@ gconf_settings_backend_get_writable (GSettingsBackend *backend, const gchar *name) { GConfSettingsBackend *gconf = GCONF_SETTINGS_BACKEND (backend); + GConfValue *value; /* We don't support checking writabality for a whole subpath, so we just say * it's not writable in such a case. */ if (name[strlen(name) - 1] == '/') return FALSE; + value = gconf_client_get (gconf->priv->client, name, NULL); + if (value == NULL) + return TRUE; + else + gconf_value_free (value); + return gconf_client_key_is_writable (gconf->priv->client, name, NULL); } |