[Sugar-devel] From GConf to GSettings

Emil Dudev emildudev at gmail.com
Thu Dec 26 12:50:25 EST 2013


Actually, when I started working on this, I changed the code in the
following way:
Read data from the GSettings database, write to both GSettings and GConf.
But I changed my mind, when I saw the article. Guess I'll make an
other commit, with my original idea.

As noted above, the only activities I have, which use GConf are read,
write and browse.
For read and write I have made the necessary changes to drop GConf and
I'll make the merge request in a minute.
For browse, I have made only a small change. But there is an other problem.

The problem with browse (and possibly, other activities) is that
GSettings does not allow new keys to be created at runtime. Moreover,
if sugar attempts to read a key, which doesn't exists, it will close.
An exception won't be thrown, it won't hang up, it will just close
with a single line in the log.
This is a serious downfall for activities, which use custom keys.
These keys have to be included in sugar's schema file, or sugar should
allow activities to define their own schemas.

Emil Dudev


On Thu, Dec 26, 2013 at 7:35 PM, Daniel Narvaez <dwnarvaez at gmail.com> wrote:
> On 26 December 2013 17:30, Emil Dudev <emildudev at gmail.com> wrote:
>>
>> My changes to the makefiles only add gsettings support. GConf can
>> still be used and I doubt there will be any problems.
>
>
> That's what I expect too but let's test if after migration gconf activities
> still works the same as before.
>
>>
>> While I was working on this, the following article came to my
>> attention: https://developer.gnome.org/gio/2.26/ch26s07.html
>> From what I understand of the article, the transition can be made
>> without affecting any of the activities.
>
>
> Unfortunately the article says the backend should not be used in production
> :/
>
> To summarize my proposal:
>
> * Move most settings to use GSettings
> * For the few settings which the activity are currently using, set them both
> in GSettings and GConf.
> * Deprecate GConf support so that activity authors will gradually migrate to
> GSettings.


More information about the Sugar-devel mailing list