Use SOGoSystemDefaults in all tools
sogo-ealarms-notify and sogo-slapd-sockd will now be able to use sogo.conf Fixes #2226pull/10/head
parent
8981dcd645
commit
4952ff7914
|
@ -23,28 +23,29 @@
|
|||
#import <Foundation/NSAutoreleasePool.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
|
||||
#import <SOGo/SOGoSystemDefaults.h>
|
||||
|
||||
#import "SOGoEAlarmsNotifier.h"
|
||||
|
||||
int
|
||||
main (int argc, char **argv, char **env)
|
||||
{
|
||||
NSAutoreleasePool *pool;
|
||||
NSUserDefaults *ud;
|
||||
SOGoEAlarmsNotifier *notifier;
|
||||
SOGoSystemDefaults *sogoDefaults;
|
||||
int rc;
|
||||
|
||||
rc = 0;
|
||||
|
||||
pool = [NSAutoreleasePool new];
|
||||
|
||||
ud = [NSUserDefaults standardUserDefaults];
|
||||
[ud addSuiteNamed: @"sogod"];
|
||||
sogoDefaults = [SOGoSystemDefaults sharedSystemDefaults];
|
||||
|
||||
if ([ud objectForKey: @"SOGoEnableEMailAlarms"])
|
||||
if ([sogoDefaults objectForKey: @"SOGoEnableEMailAlarms"])
|
||||
{
|
||||
notifier = [SOGoEAlarmsNotifier new];
|
||||
if (![notifier run])
|
||||
rc = -1;
|
||||
rc = -1;
|
||||
[notifier release];
|
||||
}
|
||||
else
|
||||
|
|
|
@ -23,13 +23,14 @@
|
|||
#import <Foundation/NSAutoreleasePool.h>
|
||||
#import <Foundation/NSUserDefaults.h>
|
||||
|
||||
#import <SOGo/SOGoSystemDefaults.h>
|
||||
|
||||
#import "SOGoSockD.h"
|
||||
|
||||
int
|
||||
main (int argc, char **argv, char **env)
|
||||
{
|
||||
NSAutoreleasePool *pool;
|
||||
NSUserDefaults *ud;
|
||||
SOGoSockD *sockd;
|
||||
int rc;
|
||||
|
||||
|
@ -37,8 +38,7 @@ main (int argc, char **argv, char **env)
|
|||
|
||||
pool = [NSAutoreleasePool new];
|
||||
|
||||
ud = [NSUserDefaults standardUserDefaults];
|
||||
[ud addSuiteNamed: @"sogod"];
|
||||
[SOGoSystemDefaults sharedSystemDefaults];
|
||||
|
||||
sockd = [SOGoSockD new];
|
||||
if ([sockd run])
|
||||
|
|
Loading…
Reference in New Issue