improve reporting of update status

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@35797 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
rfm 2012-11-16 11:14:06 +00:00
parent 82bcd1c49e
commit 5d6626ee89
2 changed files with 19 additions and 4 deletions

View file

@ -1,3 +1,8 @@
2012-11-16 Richard Frith-Macdonald <rfm@gnu.org>
* EcControl.m: Record a change in the alerter configuration as an
update of the overall configuration.
2012-10-28 Richard Frith-Macdonald <rfm@gnu.org>
* EcCommand.m:

View file

@ -2349,9 +2349,15 @@ static NSString* cmdWord(NSArray* a, unsigned int pos)
if ([mgr isReadableFileAtPath: path] == YES
&& (d = [NSDictionary dictionaryWithContentsOfFile: path]) != nil)
{
d = [NSDictionary dictionaryWithObjectsAndKeys:
d, @"Alerter", nil];
[[self cmdDefaults] setConfiguration: d];
NSDictionary *o = [[self cmdDefaults] dictionaryForKey: @"Alerter"];
if (nil == o || NO == [o isEqual: d])
{
d = [NSDictionary dictionaryWithObjectsAndKeys:
d, @"Alerter", nil];
[[self cmdDefaults] setConfiguration: d];
changed = YES;
}
if (nil == alerter)
{
alerter = [EcAlerter new];
@ -2359,7 +2365,11 @@ static NSString* cmdWord(NSArray* a, unsigned int pos)
}
else
{
DESTROY(alerter);
if (nil != alerter)
{
changed = YES;
DESTROY(alerter);
}
}
path = [base stringByAppendingPathComponent: @"Operators.plist"];