Re: question about schema files and defaults

> On Sat, 2003-12-13 at 05:14, Thomas Vander Stichele wrote:
> > On each install of the source tarball, or upgrade of the package, would
> > this mean that the schema file containing those few default profiles be
> > installed again each time (ie, giving the user the impression that he
> > can't get rid of or customize the defaults) ? Or is there something that
> > prevents this (since I never saw this happen with gnome-terminal).
> The reason this wouldn't happen with gnome-terminal is that there's a
> profile_list key. You can't build lists of things just by doing a
> directory listing, since then even default settings become mandatory to
> users.

What I meant to ask was, "How come when I run make install in
gnome-terminal my preferences for the Default profile do not get
overwritten ?" Of course I should have realised the answer was simple;
anything that the user has overridden lives in GConf, and the schema
file itself only contains schema keys.  So anything that never was
changed by the user still defaults to the schema default.

So I realize I asked the wrong question, so I should rephrase.

I have a schema file that has a profile_list key, which keeps track of
the defined profiles.  It also contains schema entries for all of the
keys a profile is made up of.

Now the question is - I want to provide the user with a few default
profiles on installation time.  I also want to make sure that
a) these are treated like any profile the user can create; ie. the user
can delete the profile completely, change the name, values, ...
b) on reinstall, it doesn't overwrite the customized settings.

I see two possible ways to do this:
1) the schema file contains *the same list of schema entries* over and
over for each profile, together with the chosen default values for that
profile.  This would then work like the Default profile in
gnome-terminal.  The drawback is that it seems ugly and redundant to
have to specify the same information over and over, and only change the
default value and the path for each profile we want to provide.

2) Somehow GConf already has provisions for this; ie. I can make a
schema entry apply to more than one actual key.  The schema file looks
like this could be allowed, and it looks like I can put more than one
<applyto> entry per <schema> section.  But does it work that way ? My
tests seem to indicate it doesn't, and I'm not sure it's supposed to

Maybe you see another way to do this as well, given the constraints.

Hope that clarifies my question a little.


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