Re: hardcoded values in ~/.gconf



On Wed, Jun 04, 2003 at 08:42:16PM -0400, Havoc Pennington wrote:
> 
> > The problem from the programmers' PoV is that you can't feed a filename
> > beginning with "~", "$HOME", or containing other shell variables, into
> > any old function and have it work. I'm fairly sure the lower level file
> > handling functions like the ones in <stdio.h> and <fcntl.h> only work
> > with expanded paths, and I doubt the GLib functions are any different.
> > It's theoretically possible to make sure only relative paths are stored
> > in config, but most things work with absolute paths (eg GTK/Gnome file
> > selectors), and converting paths, while possible, is extra donkey work. 
> 
> Sure, of course. James suggested gconf_client_set_filename() that
> would be used instead of gconf_client_set_string() and would
> automatically handle this; I think that makes sense.

If this is going to be solved I'd like to see something a smidge
more powerful.  If hard coding HOME is an issue, the same will hold
true for various other system dirs.

eg in gnumeric it irks me that we end up storing paths like
    /local/gnome22/test/lib/gnumeric/1.1.18/plugins/fn-info

Where I'd rather be smarter and do something like
    &gnumeric_libdir;plugins/fn-info



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