tweak warning

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@30784 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2010-06-19 10:48:21 +00:00
parent 797d975df9
commit 0002805a11
3 changed files with 27 additions and 26 deletions

View file

@ -1,3 +1,8 @@
2010-06-19 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSUserDefaults.m: Remove inappropriate warning (when library
used without resources).
2010-06-16 Sergey Golovin
* Source/NSTimeZone.m: find timezone from localtime file when it's

View file

@ -88,8 +88,6 @@ after-distclean::
# why we can't guess what the ./configure arguments were last time
# ./configure was called - make distclean cleans the sources
# completely, wiping out any memory of specific configuration.
base.make: base.make.in Version configure
config.mak base.make: config.mak.in base.make.in Version configure
./configure
config.mak: config.mak.in configure
./configure

View file

@ -588,14 +588,14 @@ static BOOL setSharedDefaults = NO; /* Flag to prevent infinite recursion */
*/
NSFileManager *fm = [NSFileManager defaultManager];
NSString *tail = [[[[[@"Libraries"
stringByAppendingPathComponent: @"gnustep-base"]
stringByAppendingPathComponent: @"Versions"]
stringByAppendingPathComponent:
OBJC_STRINGIFY(GNUSTEP_BASE_MAJOR_VERSION.GNUSTEP_BASE_MINOR_VERSION)]
stringByAppendingPathComponent: @"Resources"]
stringByAppendingPathComponent: @"Languages"];
NSArray *paths = NSSearchPathForDirectoriesInDomains (NSLibraryDirectory,
NSAllDomainsMask, YES);
stringByAppendingPathComponent: @"gnustep-base"]
stringByAppendingPathComponent: @"Versions"]
stringByAppendingPathComponent:
OBJC_STRINGIFY(GNUSTEP_BASE_MAJOR_VERSION.GNUSTEP_BASE_MINOR_VERSION)]
stringByAppendingPathComponent: @"Resources"]
stringByAppendingPathComponent: @"Languages"];
NSArray *paths = NSSearchPathForDirectoriesInDomains
(NSLibraryDirectory, NSAllDomainsMask, YES);
added_lang = NO;
added_locale = NO;
@ -603,8 +603,8 @@ static BOOL setSharedDefaults = NO; /* Flag to prevent infinite recursion */
while ((lang = [enumerator nextObject]))
{
NSDictionary *dict = nil;
NSString *path = nil;
NSEnumerator *pathEnumerator = [paths objectEnumerator];
NSString *path = nil;
NSEnumerator *pathEnumerator = [paths objectEnumerator];
while ((path = [pathEnumerator nextObject]) != nil)
{
@ -664,15 +664,12 @@ static BOOL setSharedDefaults = NO; /* Flag to prevent infinite recursion */
dict = GSDomainFromDefaultLocale ();
if (dict != nil)
{
[sharedDefaults setVolatileDomain: dict forName: lang];
[sharedDefaults setVolatileDomain: dict
forName: lang];
/* We do not set added_lang to YES here
* because we want the improper installation
* warning to be printed below if our own
* English language dictionary is not found,
* and we want the basic hardcoded defaults to
* be used in that case. (FIXME: Review this
* decision).
* because we want the basic hardcoded defaults
* to be used in that case.
*/
}
}
@ -683,9 +680,10 @@ static BOOL setSharedDefaults = NO; /* Flag to prevent infinite recursion */
if (added_lang == NO)
{
/* Ack! We should never get here. */
NSWarnMLog(@"Improper installation: No language locale found");
/* No language information found ... probably because the base
* library is being used 'standalone' without resources.
* We need to use hard-coded defaults.
*/
/* FIXME - should we set this as volatile domain for English ? */
[sharedDefaults registerDefaults: [self _unlocalizedDefaults]];
}
@ -1442,7 +1440,7 @@ static BOOL isPlistObject(id o)
if (dict != nil)
{
[NSException raise: NSInvalidArgumentException
format: @"a volatile domain called %@ exists", domainName];
format: @"a volatile domain called %@ exists", domainName];
}
domain = [domain mutableCopy];
[_persDomains setObject: domain forKey: domainName];
@ -1840,13 +1838,13 @@ NSLog(@"Creating empty user defaults database");
if (dict != nil)
{
[NSException raise: NSInvalidArgumentException
format: @"a persistent domain called %@ exists", domainName];
format: @"a persistent domain called %@ exists", domainName];
}
dict = [_tempDomains objectForKey: domainName];
if (dict != nil)
{
[NSException raise: NSInvalidArgumentException
format: @"the volatile domain %@ already exists", domainName];
format: @"the volatile domain %@ already exists", domainName];
}
DESTROY(_dictionaryRep);