mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-20 18:32:09 +00:00
Fixup merging of config into the Control process
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@38330 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f5287d4e79
commit
e1d9d86a61
3 changed files with 27 additions and 0 deletions
17
EcControl.m
17
EcControl.m
|
@ -2881,6 +2881,23 @@ static NSString* cmdWord(NSArray* a, unsigned int pos)
|
|||
|
||||
if (YES == changed)
|
||||
{
|
||||
/* Merge the globalconfiguration into this process' user defaults.
|
||||
* Don't forget to preserve the Alerter config.
|
||||
*/
|
||||
d = [config objectForKey: @"*"];
|
||||
if ([d isKindOfClass: [NSDictionary class]])
|
||||
{
|
||||
d = [config objectForKey: @"*"];
|
||||
}
|
||||
if (YES == [d isKindOfClass: [NSDictionary class]])
|
||||
{
|
||||
dict = [d mutableCopy];
|
||||
[dict setObject: [[self cmdDefaults] objectForKey: @"Alerter"]
|
||||
forKey: @"Alerter"];
|
||||
[[self cmdDefaults] setConfiguration: dict];
|
||||
[dict release];
|
||||
}
|
||||
|
||||
dict = [NSMutableDictionary dictionaryWithCapacity: 3];
|
||||
|
||||
/*
|
||||
|
|
|
@ -53,6 +53,11 @@
|
|||
+ (NSUserDefaults*) userDefaultsWithPrefix: (NSString*)aPrefix
|
||||
strict: (BOOL)enforcePrefix;
|
||||
|
||||
/** Returns the current configuration settings dictionary (as set using
|
||||
* the -setConfiguration: method).
|
||||
*/
|
||||
- (NSDictionary*) configuration;
|
||||
|
||||
/** Returns the prefix used by the receiver, or nil if no prefix is in use.
|
||||
*/
|
||||
- (NSString*) defaultsPrefix;
|
||||
|
|
|
@ -280,6 +280,11 @@ static NSLock *lock = nil;
|
|||
aPrefix strict: enforcePrefix] autorelease];
|
||||
}
|
||||
|
||||
- (NSDictionary*) configuration
|
||||
{
|
||||
return [self volatileDomainForName: @"EcConfiguration"];
|
||||
}
|
||||
|
||||
- (NSString*) defaultsPrefix
|
||||
{
|
||||
return nil; // No prefix in use ... this is not a proxy
|
||||
|
|
Loading…
Reference in a new issue