r36170 - in /desktop/experimental/d-conf/debian: changelog patches/git_read_default_value.patch patches/series
smcv at users.alioth.debian.org
smcv at users.alioth.debian.org
Wed Oct 24 16:36:29 UTC 2012
Author: smcv
Date: Wed Oct 24 16:36:28 2012
New Revision: 36170
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=36170
Log:
Add patch from upstream (via Ubuntu) to fix reading default values
Added:
desktop/experimental/d-conf/debian/patches/git_read_default_value.patch
Modified:
desktop/experimental/d-conf/debian/changelog
desktop/experimental/d-conf/debian/patches/series
Modified: desktop/experimental/d-conf/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/d-conf/debian/changelog?rev=36170&op=diff
==============================================================================
--- desktop/experimental/d-conf/debian/changelog [utf-8] (original)
+++ desktop/experimental/d-conf/debian/changelog [utf-8] Wed Oct 24 16:36:28 2012
@@ -20,6 +20,7 @@
[ Simon McVittie ]
* Use dpkg-maintscript-helper to clean up the obsolete bash completion file
* Add NEWS.Debian.gz recommending logging out and back in
+ * Add patch from upstream (via Ubuntu) to fix reading default values
-- Emilio Pozuelo Monfort <pochu at debian.org> Tue, 23 Oct 2012 13:58:37 +0200
Added: desktop/experimental/d-conf/debian/patches/git_read_default_value.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/d-conf/debian/patches/git_read_default_value.patch?rev=36170&op=file
==============================================================================
--- desktop/experimental/d-conf/debian/patches/git_read_default_value.patch (added)
+++ desktop/experimental/d-conf/debian/patches/git_read_default_value.patch [utf-8] Wed Oct 24 16:36:28 2012
@@ -1,0 +1,99 @@
+From ed9b7ba09f1bd82905b3b55c7d2f4c20e745f3b0 Mon Sep 17 00:00:00 2001
+From: Ryan Lortie <desrt at desrt.ca>
+Date: Tue, 2 Oct 2012 13:29:01 -0400
+Subject: [PATCH] engine/: drop DConfChangesetList
+
+It's really just a GQueue...
+
+https://bugzilla.gnome.org/show_bug.cgi?id=685316
+
+From c610b180af144add1a7b556d1d2d8fe6378cd1b2 Mon Sep 17 00:00:00 2001
+From: Ryan Lortie <desrt at desrt.ca>
+Date: Tue, 2 Oct 2012 13:29:16 -0400
+Subject: [PATCH] gsettings/: support correct read of default values
+
+The existing code had a /* XXX */ for properly dealing with the case of
+the user requesting the default value. We should probably implement
+this...
+
+https://bugzilla.gnome.org/show_bug.cgi?id=685316
+---
+diff --git a/engine/dconf-engine.c b/engine/dconf-engine.c
+index 89a0c67..30c4881 100644
+--- a/engine/dconf-engine.c
++++ b/engine/dconf-engine.c
+@@ -376,9 +376,9 @@ dconf_engine_find_key_in_queue (GQueue *queue,
+ }
+
+ GVariant *
+-dconf_engine_read (DConfEngine *engine,
+- DConfChangesetList *read_through,
+- const gchar *key)
++dconf_engine_read (DConfEngine *engine,
++ GQueue *read_through,
++ const gchar *key)
+ {
+ GVariant *value = NULL;
+ gint lock_level = 0;
+@@ -500,7 +500,7 @@ dconf_engine_read (DConfEngine *engine,
+
+ /* Step 2. Check read_through. */
+ if (read_through)
+- found_key = dconf_engine_find_key_in_queue (&read_through->queue, key, &value);
++ found_key = dconf_engine_find_key_in_queue (read_through, key, &value);
+
+ /* Step 3. Check queued changes if we didn't find it in read_through.
+ *
+diff --git a/engine/dconf-engine.h b/engine/dconf-engine.h
+index 3c65e87..a52e971 100644
+--- a/engine/dconf-engine.h
++++ b/engine/dconf-engine.h
+@@ -22,7 +22,7 @@
+ #ifndef __dconf_engine_h__
+ #define __dconf_engine_h__
+
+-#include "dconf-changeset-list.h"
++#include "../common/dconf-changeset.h"
+
+ #include <gio/gio.h>
+
+@@ -121,7 +121,7 @@ gboolean dconf_engine_is_writable (DConfEn
+
+ G_GNUC_INTERNAL
+ GVariant * dconf_engine_read (DConfEngine *engine,
+- DConfChangesetList *read_through,
++ GQueue *read_through,
+ const gchar *key);
+
+ G_GNUC_INTERNAL
+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
+
Modified: desktop/experimental/d-conf/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/d-conf/debian/patches/series?rev=36170&op=diff
==============================================================================
--- desktop/experimental/d-conf/debian/patches/series [utf-8] (original)
+++ desktop/experimental/d-conf/debian/patches/series [utf-8] Wed Oct 24 16:36:28 2012
@@ -1,1 +1,2 @@
01_env_path.patch
+git_read_default_value.patch
More information about the pkg-gnome-commits
mailing list