← Back to team overview

unity-dev team mailing list archive

Re: [Ayatana-dev] QUnitySettings: managing Unity-2D settings with gconf and gsettings support

 

Le 17/12/11 11:21, a.grandi@xxxxxxxxx a écrit :
Hi,

On 16 December 2011 21:48, Mikkel Kamstrup Erlandsen
<mikkel.kamstrup@xxxxxxxxxxxxx>  wrote:
Sorry to negative here, but I don't think this sounds like a too great idea.

don't worry :)
I wrote this email before starting any code just to avoid writing
useless code ;)

Firstly, I don't see any signs in the moons or stars for us moving to
anything other than GSettings once we're there. So the abstraction would
just end up always abstracting GSettings, at which point an abstraction
seems off. Better to just get the full port done.

I talked about gconf -->  gsettings because Andrea told me that Unity
is moving from gconf to gsettings.
I don't know the details of their implementation. For example: do they
save the settings in the same format and locations? Can I save with
gconf and read with gsettings or are they two totally different
things? Just asking... to understand how they work.

It's pretty fine for me to start directly with gsettings.

Secondly, GSettings is a really powerful and comprehensive API. If Unity-2d
would become unable to use it to the full extent because the abstraction
layers needs to be the lowest common denominator (with GConf or other) that
would not only be a shame, but also indirectly impact Unity-3d since we want
to keep them compatible.

I don't know if Unity-2D can or cannot use this.... are there any know
problems? Maybe we simply need a Qt binding?

Lastly; there is already a working Qt dconf+gsettings schema bridge.
https://gitorious.org/dconf-qt or https://launchpad.net/dconf-qt

nice! I will give a look to that code and I'll ask any question in a
different thread maybe.

Yes I think they should share in 99% of cases. There may be specific corner
cases, but I can't think of any off the top of my head.

For instance; the launcher items are stored in gsettings and we definitely
want to share those! :-)

perfect, I agree :)


We already use it in Unity 2D. In fact dconf-qt historically was created for Unity 2D in the first place. Look at config.h for convenience functions.

Florian



Follow ups

References