After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 647909 - Port Folks to GSettings
Port Folks to GSettings
Status: RESOLVED FIXED
Product: folks
Classification: Platform
Component: libfolks
git master
Other Linux
: Normal normal
: folks-0.6.3
Assigned To: folks-maint
folks-maint
: 646658 660460 (view as bug list)
Depends on: 635379
Blocks: 622558
 
 
Reported: 2011-04-15 21:21 UTC by Travis Reitter
Modified: 2012-04-23 09:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (4.08 KB, patch)
2011-09-16 14:17 UTC, Raul Gutierrez Segales
needs-work Details | Review
Port to GSettings (12.64 KB, patch)
2012-04-22 21:16 UTC, Philip Withnall
committed Details | Review

Description Travis Reitter 2011-04-15 21:21:51 UTC
We've currently got a GConf key to select which backend should be the primary. This should be ported to GSettings, so as not to depend upon GConf explicitly.
Comment 1 Philip Withnall 2011-06-14 16:38:19 UTC
*** Bug 646658 has been marked as a duplicate of this bug. ***
Comment 2 Travis Reitter 2011-08-01 18:39:27 UTC
Punting bugs that won't be fixed by Folks 0.6.0.
Comment 3 Travis Reitter 2011-08-06 14:37:20 UTC
Another requirement: we need a transition script to automatically copy users' GConf key/values to GSettings. There's apparently infrastructure in GSettings to make this easy.
Comment 4 Travis Reitter 2011-08-23 16:21:35 UTC
(Setting target bugs for Folks 0.6.1. Search for this phrase to deal with bug mail spam.)
Comment 5 Raul Gutierrez Segales 2011-08-29 12:46:51 UTC
Didn't make this release; punting to 0.6.2.
Comment 6 Travis Reitter 2011-09-05 16:49:34 UTC
(Punting bugs to 0.6.4)
Comment 7 Raul Gutierrez Segales 2011-09-16 14:17:49 UTC
Created attachment 196724 [details] [review]
patch

With regards to a transition script, I think packagers will know better how to work this out using gsettings-data-convert since we are not shipping a GConf schema anyways..
Comment 8 Philip Withnall 2011-09-16 19:41:35 UTC
Review of attachment 196724 [details] [review]:

I still see lots of things listed in `git grep -i gconf`.

I think we need a schema and the associated autofoo to be added.

We should provide the .convert file for gsettings-data-convert ourselves, or (in the best case) packagers will end up duplicating each others' work. Does it matter that we weren't shipping a GConf schema before, for the purposes of data conversion?

::: folks/individual-aggregator.vala
@@ +88,3 @@
   private string _configured_primary_store_id;
+  private static const string _FOLKS_GSETTINGS_SCHEMA = "org.freedesktop.folks";
+  private static const string _PRIMARY_STORE_CONFIG_KEY = "primary_store";

Shouldn't this use hyphens rather than underscores (e.g. “primary-store”)?

@@ +306,3 @@
 
+          var settings = new Settings (this._FOLKS_GSETTINGS_SCHEMA);
+          var val  = settings.get_string (this._PRIMARY_STORE_CONFIG_KEY);

Double space.
Comment 9 Raul Gutierrez Segales 2011-09-16 19:50:39 UTC
(In reply to comment #8)
> Review of attachment 196724 [details] [review]:
> 
> I still see lots of things listed in `git grep -i gconf`.
> 

I think much of that is due to e-d-s' usage of GConf and our need to run our own instance of GConf for our tests.
Comment 10 Travis Reitter 2011-09-29 14:33:32 UTC
*** Bug 660460 has been marked as a duplicate of this bug. ***
Comment 11 Philip Withnall 2012-04-22 21:16:17 UTC
Created attachment 212571 [details] [review]
Port to GSettings

https://www.gitorious.org/folks/folks/commits/647909-gsettings

Updated patch which applies to master. This fixes the things mentioned in comment #8, including adding a schema and conversion file. Should be ready to merge.
Comment 12 Philip Withnall 2012-04-22 21:17:22 UTC
(In reply to comment #11)
> Created an attachment (id=212571) [details] [review]
> Port to GSettings
> 
> https://www.gitorious.org/folks/folks/commits/647909-gsettings
> 
> Updated patch which applies to master. This fixes the things mentioned in
> comment #8, including adding a schema and conversion file. Should be ready to
> merge.

I should also mention, `make distcheck` passes with it, folks-inspect runs fine, and `make check` also continues to work.
Comment 13 Xavier Claessens 2012-04-23 08:31:46 UTC
Review of attachment 212571 [details] [review]:

::: folks/individual-aggregator.vala
@@ +1709,3 @@
               _("Can’t link personas with no primary store.") + "\n" +
               _("Persona store ‘%s:%s’ is configured as primary, but could not be found or failed to load.") + "\n" +
+            _("Check the service providing the persona store is running, or change the default store in that service or using the “%s” GSettings key."),

why do you change indentation of this line?

@@ +1976,3 @@
               _("Can’t add personas with no primary store.") + "\n" +
               _("Persona store ‘%s:%s’ is configured as primary, but could not be found or failed to load.") + "\n" +
+            _("Check the service providing the persona store is running, or change the default store in that service or using the “%s” GSettings key."),

why do you change indentation of this line?
Comment 14 Philip Withnall 2012-04-23 09:48:27 UTC
Raúl magically finished his patch by remotely controlling my hands. Merged to master.

I’ve opened bug #674611 about eventually dropping our use of gconf.path.

commit 374beb10e0445f1caba9a12cbf61c21938812215
Author: Raul Gutierrez Segales <rgs@collabora.co.uk>
Date:   Fri Sep 16 15:15:03 2011 +0100

    core: Port to GSettings
    
    Drops our dependency on GConf, but bumps our GLib dependency to 2.26.0.
    
    Closes: https://bugzilla.gnome.org/show_bug.cgi?id=647909

 NEWS                                          |    3 ++
 configure.ac                                  |   11 +++++--
 docs/Makefile.am                              |    4 --
 folks/Makefile.am                             |   20 ++++++++++--
 folks/folks.convert                           |    2 +
 folks/individual-aggregator.vala              |   42 ++++++++++---------------
 folks/org.freedesktop.folks.gschema.xml.in.in |   12 +++++++
 folks/persona-store.vala                      |    2 +-
 po/POTFILES.in                                |    1 +
 po/POTFILES.skip                              |    1 +
 10 files changed, 62 insertions(+), 36 deletions(-)
Comment 15 Philip Withnall 2012-04-23 09:48:52 UTC
Comment on attachment 212571 [details] [review]
Port to GSettings

Committed with minor rewording of the strings mentioned in comment #13.