← Back to team overview

unity-dev team mailing list archive

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

 

On 12/16/2011 02:27 AM, a.grandi@xxxxxxxxx wrote:
Hi all,

this evening I had a quick chat with Andrea Azzarone and we talked
about Unity settings.
We both agreed that while Unity has lot of configurable settings
(actually done with gconf but you're migrating to gsettings), Unity-2D
has not these settings and everything is hard-coded in the sources.

At this point I proposed: why don't we create a class for Unity-2D to
let it save/load settings?

This is what I've in mind: a QUnitySettings class that uses a
"wrapper" that supports both gconf and gsettings, so when the
migration to gsettings is complete you don't have to touch the
Unity-2D code again.
I'd like something you can use in this way:

Sorry to negative here, but I don't think this sounds like a too great idea.

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.

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.

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

SNIP
p.s: do you think that Unity-2D should read/write the same settings of
Unity of do you think they should be saved in a different place? I
mean.. if everyone is reading from the same place, setting icon size
to 36 pixel in Unity will result in having 32 pixels icons in Unity-2D
too and viceversa.

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! :-)

Cheers,
Mikkel





Follow ups

References