unity-dev team mailing list archive
-
unity-dev team
-
Mailing list archive
-
Message #00378
Re: [Ayatana-dev] QUnitySettings: managing Unity-2D settings with gconf and gsettings support
Hi,
On 17 December 2011 13:36, Florian Boucault
<florian.boucault@xxxxxxxxxxxxx> wrote:
> 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.
I've given a further look at dconf-qt and I've some question about it.
1) in config.h there are two different settings for Unity and Unity-2D:
static const char* UNITY2D_DCONF_SCHEMA = "com.canonical.Unity2d";
static const char* LAUNCHER2D_DCONF_SCHEMA = "com.canonical.Unity2d.Launcher";
static const char* PANEL2D_DCONF_SCHEMA = "com.canonical.Unity2d.Panel";
static const char* UNITY_DCONF_SCHEMA = "com.canonical.Unity";
static const char* LAUNCHER_DCONF_SCHEMA = "com.canonical.Unity.Launcher";
static const char* PANEL_DCONF_SCHEMA = "com.canonical.Unity.Panel";
didn't we say that we should share the same settings between Unity and Unity-2D?
2) I'm using dconf-editor to browse the current settings in a visual
way and I see that there aren't many settings available yet (neither
for Unity). Is this because of Unity not completly migrated from gconf
to gsettings?
3) "dconf" name really confuses me sometimes :P is it related to gconf
or to gsettings?
4) Suppose I want to read/write a new value for Unity-2D, how/where to
I define a new schema to make it available in dconf-editor/dconf-qt ?
5) I've found a couple of example of how to read settings:
launcher/app/launcher.cpp:
panel.setUseStrut(launcher2dConfiguration().property("useStrut").toBool());
launcher/app/launcherview.cpp: QVariant value =
launcher2dConfiguration().property("superKeyEnable");
launcher/app/visibilitycontroller.cpp: AutoHideMode mode =
AutoHideMode(launcher2dConfiguration().property("hideMode").toInt());
but, how do I write and save them? It would not be bad to have the
documentation available here
http://developer.ubuntu.com/resources/platform/api/ with some
examples...
Thanks in advance for your help :)
--
Andrea Grandi - Nokia Qt Ambassador
Ubuntu Member: https://launchpad.net/~andreagrandi
website: http://www.andreagrandi.it
References