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:
rfm 2016-04-24 08:38:42 +00:00
parent a75f5a3935
commit 41c1f27fe5

View file

@ -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;
}