Re: GConf and bonobo-config - some ideas



Havoc Pennington wrote:

> Dietmar Maurer <dietmar ximian com> writes:
> > I am a bit unsure about the purpose of schema's. Schema's store default
> > values and documentation, and you can map each key to a schema. But is it
> > really necessary that we make this mapping configurable? Isn't it possible to
> > map "/a/simple/key" to schema "/schema/a/simple/key".  And do we really need
> > that additional default value stored in the schema?
> >
>
> It isn't clear to me how defaults are handled in bonobo-config, it
> might be useful to explain that.

Each bonobo-config database is associated with a default database (in a recursive
way, i.e. the default database also maintain a link to another default database).


>  - where do I install the defaults, if I'm writing an app
>    (e.g. from a Makefile)

in the default database.

>  - how are defaults obtained at runtime

getDefault(in string key)

>  - how does the sysadmin reset to defaults from a config tool

You can remove the value in the user database which overwrites the value in the
default database. Or you can read the default value and overwrite the user value.

>  - if a sysadmin switches config backends, how to do they store the
>    defaults in the new backend

copy the old default database to the new default database.

> For GConf the answers are:
>
>  - at 'make install' or 'rpm -U' time, we a) put the schema
>    files in /etc/gconf/schemas and also b) install them
>    to the current system default database
>  - from the schemas stored in the system default database
>  - config tool asks GConf API for the default, which comes
>    from the schema
>  - the admin uses gconftool to reinstall the schemas in
>    /etc/gconf/schemas
>
> Havoc
>
> _______________________________________________
> gnome-hackers mailing list
> gnome-hackers gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-hackers


_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]