Re: desktop schemas review [was: Re: GSettings migration status]



> A possible solution is to store paths under your home
> directory as relative paths, and when reading, assume
> any relative paths are relative to your home directory.
> Doing this with each individual application would be
> tiresome and error-prone, but it would be easy with
> a convenience API like this.

The traditional Unix way to deal with such paths is to base them
off an environment variable so

g_settings_set_relative_file(settings, key, envvar, path);

eg

g_settings_set_relative_file(settings, "mbox", "HOME", "mbox");

Then you have the fun that $HOME/mbox is a perfectly valid actual
filename so you need to know what you are looking at, or store files in a
smarter way.

Apple take this even further with removable media so that it knows about
paths on a removable device by the device name and relative path.

Alan


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