User defaults fix ... use NSLanguages

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@9302 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2001-03-05 23:31:51 +00:00
parent 05844a01b9
commit a3389210f1
4 changed files with 20 additions and 4 deletions

View file

@ -1,3 +1,10 @@
2001-03-05 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSUserDefaults.m: Changed ([+setUserLanguages:]) to use
NSLanguages.
* Documentation/gsdoc/NSUserDefaults.gsdoc: documented the
([+setUserlanguages:]) method.
2001-03-04 Jonathan Gapen <jagapen@home.com>
* Documentation/gsdoc/NSCharacterSet.gsdoc: Documented some methods.

View file

@ -99,6 +99,15 @@
</desc>
<standards><GNUstep/><NotMacOS-X/><NotOpenStep/></standards>
</method>
<method type="void" factory="yes">
<sel>setUserLanguages:</sel>
<arg type="NSArray*">languages</arg>
<desc>
Sets the array of user languages preferences. Places the specified
array in the <em>NSLanguages</em> user default.
</desc>
<standards><GNUstep/><NotMacOS-X/><NotOpenStep/></standards>
</method>
<method type="NSArray*">
<sel>arrayForKey:</sel>
<arg type="NSString*">defaultName</arg>

View file

@ -152,7 +152,7 @@ GSFFCallInvokeWithTargetAndImp(NSInvocation *_inv, id anObject, IMP imp)
{
int i;
av_alist alist;
NSInvocation_t *inv = _inv;
NSInvocation_t *inv = (NSInvocation_t*)_inv;
void *retval = inv->_retval;
/* Do an av call starting with the return type */

View file

@ -381,10 +381,10 @@ static BOOL setSharedDefaults = NO; /* Flag to prevent infinite recursion */
NSMutableDictionary *globDict = [[self standardUserDefaults]
persistentDomainForName: NSGlobalDomain];
if (!languages) // Remove the entry
[globDict removeObjectForKey: @"Languages"];
if (languages == nil) // Remove the entry
[globDict removeObjectForKey: @"NSLanguages"];
else
[globDict setObject: languages forKey: @"Languages"];
[globDict setObject: languages forKey: @"NSLanguages"];
[[self standardUserDefaults]
setPersistentDomain: globDict forName: NSGlobalDomain];
return;