mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-19 10:01:24 +00:00
fix updating command settings ... if there's no change, don't update domain
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@39690 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a75f5a3935
commit
41c1f27fe5
1 changed files with 12 additions and 8 deletions
|
@ -355,15 +355,19 @@ static NSLock *lock = nil;
|
|||
}
|
||||
if (nil != new)
|
||||
{
|
||||
if (nil != old)
|
||||
{
|
||||
[self removeVolatileDomainForName: @"EcCommand"];
|
||||
}
|
||||
[self setVolatileDomain: new forName: @"EcCommand"];
|
||||
if (NO == [new isEqual: old])
|
||||
{
|
||||
if (nil != old)
|
||||
{
|
||||
[self removeVolatileDomainForName: @"EcCommand"];
|
||||
}
|
||||
[self setVolatileDomain: new forName: @"EcCommand"];
|
||||
[new release];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:
|
||||
NSUserDefaultsDidChangeNotification object: self];
|
||||
return YES;
|
||||
}
|
||||
[new release];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:
|
||||
NSUserDefaultsDidChangeNotification object: self];
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue