Re: desktop schemas review [was: Re: GSettings migration status]
- From: Alexander Larsson <alexl redhat com>
- To: Alan Cox <alan lxorguk ukuu org uk>
- Cc: Shaun McCance <shaunm gnome org>, GNOME menubar gnome org, Christian Persch <chpe gnome org>, Desktop Development List <desktop-devel-list gnome org>
- Subject: Re: desktop schemas review [was: Re: GSettings migration status]
- Date: Wed, 07 Jul 2010 20:57:16 +0200
On Wed, 2010-07-07 at 15:24 +0100, Alan Cox wrote:
> > 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.
GVfs metadata does something similar based on mount uuids etc. However,
doing something like that makes a simple "set a pathname setting"
operation into a possibly blocking (maybe hanging on NFS or suchlike)
operation, so it is not something to do lightly or automatically.
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
alexl redhat com alexander larsson gmail com
He's an ungodly Catholic cowboy moving from town to town, helping folk in
trouble. She's a chain-smoking wisecracking angel from aristocratic European
stock. They fight crime!
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]