Monotone-Parent: b65579776953326ae0dd65da2a1d59cacda222cd

Monotone-Revision: 8b6f603129f482aecde7edceba94520c3b955ddb

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-07-23T14:11:26
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-07-23 14:11:26 +00:00
parent 1b15400400
commit 7e22621cf3
2 changed files with 14 additions and 8 deletions
+6 -5
View File
@@ -36,7 +36,7 @@
#import <SOGo/NSCalendarDate+SOGo.h>
#import <SOGoUI/UIxComponent.h>
static NSString *defaultModule;
static NSString *defaultModule = nil;
@interface SOGoUserHomePage : UIxComponent
@@ -48,10 +48,10 @@ static NSString *defaultModule;
{
NSUserDefaults *ud;
ud = [NSUserDefaults standardUserDefaults];
defaultModule = [ud stringForKey: @"SOGoUIxDefaultModule"];
if (defaultModule)
if (!defaultModule)
{
ud = [NSUserDefaults standardUserDefaults];
defaultModule = [ud stringForKey: @"SOGoUIxDefaultModule"];
if (defaultModule)
{
if (!([defaultModule isEqualToString: @"Calendar"]
@@ -62,10 +62,11 @@ static NSString *defaultModule;
@"'Calendar', 'Contacts' or Mail)", defaultModule];
defaultModule = @"Calendar";
}
else
defaultModule = @"Calendar";
}
else
defaultModule = @"Calendar";
[self logWithFormat: @"default module set to '%@'", defaultModule];
[defaultModule retain];
}
+8 -3
View File
@@ -40,6 +40,7 @@
workweek = from -> to
identities */
static BOOL defaultsRead = NO;
static BOOL shouldDisplayPasswordChange = NO;
@implementation UIxPreferences
@@ -48,9 +49,13 @@ static BOOL shouldDisplayPasswordChange = NO;
{
NSUserDefaults *ud;
ud = [NSUserDefaults standardUserDefaults];
shouldDisplayPasswordChange
= [ud boolForKey: @"SOGoUIxUserCanChangePassword"];
if (!defaultsRead)
{
ud = [NSUserDefaults standardUserDefaults];
shouldDisplayPasswordChange
= [ud boolForKey: @"SOGoUIxUserCanChangePassword"];
defaultsRead = YES;
}
}
- (id) init