Re: Panel's GConf usage
- From: Havoc Pennington <hp redhat com>
- To: Mark McLoughlin <mark skynet ie>
- Cc: desktop-devel-list gnome org
- Subject: Re: Panel's GConf usage
- Date: Tue, 11 Feb 2003 21:55:57 -0500
On Fri, Feb 07, 2003 at 02:40:02PM +1300, Mark McLoughlin wrote:
> * Use a gconftool script which would write the default setup
> to the defaults database. It would look something like:
>
> export GCONF_CONFIG_SOURCE='xml:readwrite:/usr/etc/gconf/gconf.xml.defaults'
> gconftool-2 --direct
> -s /apps/panel/profiles/default/panels/00001/size -t int 32
> gconftool-2 --direct
> -s /apps/panel/profiles/default/panels/00002/size -t int 24
This can be slightly beautified using shell functions, as in the admin
guide.
> * Come up with a homegrown file format for describing a the
> default panel setup and write a simple program for parsing
> it and installing it into the defaults database. It might
> look something like:
>
> <default_profile>
> <toplevel id="top_menu_panel">
> <name>Top Menu Panel</name>
> <orientation>top</orientation>
Again, I think using XML elements is quite bad here, should use
attributes. But I like the third option best anyway:
> * Come up with a new GConf file format which
> --makefile-install-rule would handle just like the .schemas
> file. This file format would effectively be a gconf script
> e.g
>
> <gconfvaluesfile>
> <valueslist>
>
> <value type="int" key="/apps/panel/profiles/default/panels/0001/size">24</value>
> <value type="int" key="/apps/panel/profiles/default/panels/0002/size">32</value>
>
> </valueslist>
> </gconfvaluesfile>
I would say we should implement this as:
gconftool-2 --dump /apps/panel > panel-config.xml
gconftool-2 --load /apps/panel < panel-config.xml
Then this can also be used to backup/restore/move configurations, and
you can configure a panel on a sample account, dump it, and then load
it to the default config source (possibly doing some small munging in
between, e.g. to use systemwide .desktop files instead of temporary
launcher names).
To handle dump/load of a profile to a different name, perhaps
gconftool should be able to re-prefix the stuff being loaded.
dump/load is probably the most frequently-requested gconf feature
anyhow.
> George wanted to have the current profile to be decided by the
> current session name - you basically have a profile for each session.
>
> Thinking about it, I prefer George's approach (even though I'd
> completely forgotten about it).
I like George's way better too; if we have a config profile system, it
seems logical to have a single global one for the desktop. Since the
use case is probably logging in to different computers or at different
locations, basically.
> Alternatively, we could forget the whole idea of session
> management with the panel. All your configuration is global and is the
> same for all sessions.
It does seem useful to be able to have multiple named configurations,
for things that might be sensitive to monitor size or whatever.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]