discuss-gnustep
[Top][All Lists]
Advanced

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

Re: $GNUSTEP_DEFAULTS_DIR not set/exported in GNUstep.sh


From: Nicola Pero
Subject: Re: $GNUSTEP_DEFAULTS_DIR not set/exported in GNUstep.sh
Date: Fri, 30 Jul 2004 18:03:17 +0100 (BST)

> >  1. have window maker detect and parse ~/.GNUsteprc.  You can probably
> > copy code from user_home.c (assuming licenses are compatible of 
> > course).
> > If a defaults directory is set there, use it.  If a gnustep user 
> > directory
> > is set there, append Library/Defaults/ and use it.  Else, just use
> > ~/GNUstep/Library/Defaults/ (I think, check what the default is).
> 
> Hmm.  Off the top of my head, surely a better option (and I can't 
> check, don't have the windowmaker source to hand) would be to refactor 
> the defaults handling of windowmaker to use NSUserDefaults instead of 
> relying on the environment variables directly.  Under GNUstep only, of 
> course.  That way, under GNUstep, it would use the right directory 
> automagically, and under plain *n*x it would rely on whatever its 
> current methodology is.
>
> I appreciate that this causes code duplication, but it's the only way 
> to make something _really_ *step compliant and have it work under plain 
> *n*x as well.

Interesting idea - maybe we could have a library exposing NSUserDefaults
with a simple C interface.

Then WindowMaker could use this C library (optionally I suppose, if
compiled with support for it) to use native GNUstep user defaults
natively.

If the library is not available, they'd use some sort of built-in fallback
which does something similar in pure C.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]