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,24 +23,25 @@
|
||||||
#import <Foundation/NSAutoreleasePool.h>
|
#import <Foundation/NSAutoreleasePool.h>
|
||||||
#import <Foundation/NSUserDefaults.h>
|
#import <Foundation/NSUserDefaults.h>
|
||||||
|
|
||||||
|
#import <SOGo/SOGoSystemDefaults.h>
|
||||||
|
|
||||||
#import "SOGoEAlarmsNotifier.h"
|
#import "SOGoEAlarmsNotifier.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char **argv, char **env)
|
main (int argc, char **argv, char **env)
|
||||||
{
|
{
|
||||||
NSAutoreleasePool *pool;
|
NSAutoreleasePool *pool;
|
||||||
NSUserDefaults *ud;
|
|
||||||
SOGoEAlarmsNotifier *notifier;
|
SOGoEAlarmsNotifier *notifier;
|
||||||
|
SOGoSystemDefaults *sogoDefaults;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
rc = 0;
|
rc = 0;
|
||||||
|
|
||||||
pool = [NSAutoreleasePool new];
|
pool = [NSAutoreleasePool new];
|
||||||
|
|
||||||
ud = [NSUserDefaults standardUserDefaults];
|
sogoDefaults = [SOGoSystemDefaults sharedSystemDefaults];
|
||||||
[ud addSuiteNamed: @"sogod"];
|
|
||||||
|
|
||||||
if ([ud objectForKey: @"SOGoEnableEMailAlarms"])
|
if ([sogoDefaults objectForKey: @"SOGoEnableEMailAlarms"])
|
||||||
{
|
{
|
||||||
notifier = [SOGoEAlarmsNotifier new];
|
notifier = [SOGoEAlarmsNotifier new];
|
||||||
if (![notifier run])
|
if (![notifier run])
|
||||||
|
|
|
@ -23,13 +23,14 @@
|
||||||
#import <Foundation/NSAutoreleasePool.h>
|
#import <Foundation/NSAutoreleasePool.h>
|
||||||
#import <Foundation/NSUserDefaults.h>
|
#import <Foundation/NSUserDefaults.h>
|
||||||
|
|
||||||
|
#import <SOGo/SOGoSystemDefaults.h>
|
||||||
|
|
||||||
#import "SOGoSockD.h"
|
#import "SOGoSockD.h"
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char **argv, char **env)
|
main (int argc, char **argv, char **env)
|
||||||
{
|
{
|
||||||
NSAutoreleasePool *pool;
|
NSAutoreleasePool *pool;
|
||||||
NSUserDefaults *ud;
|
|
||||||
SOGoSockD *sockd;
|
SOGoSockD *sockd;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
@ -37,8 +38,7 @@ main (int argc, char **argv, char **env)
|
||||||
|
|
||||||
pool = [NSAutoreleasePool new];
|
pool = [NSAutoreleasePool new];
|
||||||
|
|
||||||
ud = [NSUserDefaults standardUserDefaults];
|
[SOGoSystemDefaults sharedSystemDefaults];
|
||||||
[ud addSuiteNamed: @"sogod"];
|
|
||||||
|
|
||||||
sockd = [SOGoSockD new];
|
sockd = [SOGoSockD new];
|
||||||
if ([sockd run])
|
if ([sockd run])
|
||||||
|
|
Loading…
Reference in New Issue