mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Tidyup categories
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16478 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e9733d43d2
commit
917cd26e5d
14 changed files with 161 additions and 53 deletions
|
@ -130,7 +130,6 @@ static void updateCache(NSUserDefaults *self)
|
|||
- (void) __createStandardSearchList;
|
||||
- (NSDictionary*) __createArgumentDictionary;
|
||||
- (void) __changePersistentDomain: (NSString*)domainName;
|
||||
- (void) __timerTicked: (NSTimer*)tim;
|
||||
@end
|
||||
|
||||
/**
|
||||
|
@ -522,7 +521,8 @@ static BOOL setSharedDefaults = NO; /* Flag to prevent infinite recursion */
|
|||
[tempDefaults setSearchList: sList];
|
||||
RELEASE(sList);
|
||||
currLang = [tempDefaults stringArrayForKey: @"NSLanguages"];
|
||||
AUTORELEASE(tempDefaults);
|
||||
AUTORELEASE(RETAIN(currLang));
|
||||
RELEASE(tempDefaults);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -825,15 +825,17 @@ static NSString *pathForUser(NSString *user)
|
|||
setObject: [NSMutableDictionaryClass dictionaryWithCapacity: 10]
|
||||
forKey: NSRegistrationDomain];
|
||||
|
||||
[[NSNotificationCenter defaultCenter] addObserver: self
|
||||
selector: @selector(synchronize)
|
||||
name: @"GSHousekeeping"
|
||||
object: nil];
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void) dealloc
|
||||
{
|
||||
if (_tickingTimer != nil)
|
||||
{
|
||||
[_tickingTimer invalidate];
|
||||
}
|
||||
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||
RELEASE(_lastSync);
|
||||
RELEASE(_searchList);
|
||||
RELEASE(_persDomains);
|
||||
|
@ -1364,15 +1366,6 @@ static BOOL isPlistObject(id o)
|
|||
}
|
||||
}
|
||||
|
||||
if (_tickingTimer == nil)
|
||||
{
|
||||
_tickingTimer = [NSTimer scheduledTimerWithTimeInterval: 30
|
||||
target: self
|
||||
selector: @selector(__timerTicked:)
|
||||
userInfo: nil
|
||||
repeats: NO];
|
||||
}
|
||||
|
||||
/*
|
||||
* If we haven't changed anything, we only need to synchronise if
|
||||
* the on-disk database has been changed by someone else.
|
||||
|
@ -1397,8 +1390,12 @@ static BOOL isPlistObject(id o)
|
|||
{
|
||||
NSDate *mod;
|
||||
|
||||
/*
|
||||
* If the database was modified since the last synchronisation
|
||||
* we need to read it.
|
||||
*/
|
||||
mod = [attr objectForKey: NSFileModificationDate];
|
||||
if (mod !=nil && [_lastSync earlierDate: mod] != _lastSync)
|
||||
if (mod != nil && [_lastSync laterDate: mod] != _lastSync)
|
||||
{
|
||||
wantRead = YES;
|
||||
}
|
||||
|
@ -1806,14 +1803,6 @@ static BOOL isPlistObject(id o)
|
|||
}
|
||||
[_lock unlock];
|
||||
}
|
||||
|
||||
- (void) __timerTicked: (NSTimer*)tim
|
||||
{
|
||||
if (tim == _tickingTimer)
|
||||
_tickingTimer = nil;
|
||||
|
||||
[self synchronize];
|
||||
}
|
||||
@end
|
||||
|
||||
NSDictionary*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue