GSettings status update - OS X tester wanted
janssens-geert at telenet.be
Wed Mar 27 13:38:29 EDT 2013
As announced some time ago, I would like the 2.6 version of GnuCash to be
gconf-free. I have been working since to switch to gsettings.
Due to both having less time available as expected and it being more work than
I estimated, this is taking me longer than I hoped.
So far I have laid the foundations:
- created convenience functions similar to those we have for gconf
- converted and completed the schema files (gsettings is much stricter about
requiring schema definitions for each option to use)
- some preparatory clean-ups
- the first actual conversions of options from gconf to gsettings
I have not yet pushed my work to trunk for a couple of reasons:
- as long as I'm working on the conversion, I have configured gconf as back-end
for gsettings (a documented conversion trick), so GnuCash can access the same
settings via either interface. But the conversion is not one-to-one for all
options and schema paths may not always be compatible. So as long as the gconf
back-end is used, there are some preferences errors. Those are gone if the
native gsettings back-end is used though.
- but I can't use the native back-end just yet. I'd first need to convert the
old settings data to gsettings. I have not yet written a script for that. And
I'd rather write it in the end: the gconf paths are not compatible with
gsettings schema's. Currently this doesn't give errors, because I have
disabled strict pathname checking. But before the end of the conversion, I'll
have to rename many schema's paths and keys (mainly replacing _ with -). I'd
rather convert data only once the native path are final.
- I'm not sure how the Windows and OS X builds will react to what I've done so
It's mostly for this last item I'm writing this message. Before I continue,
I'd like to know how the work I have so far behaves on other platforms. I can
test on Windows myself, but I don't have an OS X test box available anymore.
So I have pushed my branch to my own github repo:
Can someone apply this on trunk locally and build for OS X ?
To run it, there are probably a couple of small things to keep in mind. To
make it work, I have added a couple of environment variables in the
environment file (/etc/gnucash/environment). However, this file is not used on
OS X. So some other way to set these must be used. From the environment file:
# Temporarily use gconf as backend for GSettings
# This allows for a gradual transition from GConf to GSettings
# GnuCash was not installed in the default location
# XDG_DATA_DIRS will be set so that our documentation
# and gsettings schemas are found.
What can be tested already ? For every detail: see the commit messages.
But for example: in the business search dialogs, the "Active" toggle button
should be saved and recalled. Window position and size will only saved and
restored successfully when the native backend is used (ie disable the
GSETTINGS_BACKEND environment variable).
Also last used file paths are covered via gsettings (not the history though!).
For example try to export a report to a specific directory and the next time
you export a report, the same directory should be proposed.
Any feedback is greatly appreciated.
More information about the gnucash-devel