Author: rfm
Date: Sun Apr 24 10:38:42 2016
New Revision: 39690
URL: http://svn.gna.org/viewcvs/gnustep?rev=39690&view=rev
Log:
fix updating command settings ... if there's no change, don't update domain
Modified:
libs/ec/trunk/EcUserDefaults.m
Modified: libs/ec/trunk/EcUserDefaults.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/ec/trunk/EcUserDefaults.m?rev=39690&r1=39689&r2=39690&view=diff
==============================================================================
--- libs/ec/trunk/EcUserDefaults.m (original)
+++ libs/ec/trunk/EcUserDefaults.m Sun Apr 24 10:38:42 2016
@@ -355,15 +355,19 @@
}
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;
}
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs