Monotone-Parent: f91da4057972f6c2f3979c2fccecfa757ae6619c

Monotone-Revision: 088d781f2222b451b13ed0a3faf660935d3f18da

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-08-22T15:16:35
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-08-22 15:16:35 +00:00
parent 035e0b8e7e
commit 01b760ff49
3 changed files with 33 additions and 1 deletions
+25 -1
View File
@@ -25,6 +25,8 @@
#import <Foundation/NSUserDefaults.h>
#import <Foundation/NSValue.h>
#import <NGObjWeb/WOApplication.h>
#import <NGObjWeb/WOContext.h>
#import <NGObjWeb/WORequest.h>
#import <NGObjWeb/SoObject.h>
#import <NGExtensions/NSNull+misc.h>
@@ -310,10 +312,20 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
- (NSString *) language
{
NSArray *bLanguages;
WOContext *context;
if (!language)
{
language = [[self userDefaults] stringForKey: @"Language"];
if (!language)
if (![language length])
{
context = [[WOApplication application] context];
bLanguages = [[context request] browserLanguages];
if ([bLanguages count] > 0)
language = [bLanguages objectAtIndex: 0];
}
if (![language length])
language = defaultLanguage;
[language retain];
}
@@ -452,6 +464,18 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
return [[defaultAccount objectForKey: @"identities"] objectAtIndex: 0];
}
- (NSString *) messageForwarding
{
NSString *messageForwarding;
messageForwarding
= [[self userDefaults] stringForKey: @"MessageForwarding"];
if (![messageForwarding length])
messageForwarding = @"attached";
return messageForwarding;
}
/* folders */
// TODO: those methods should check whether the traversal stack in the context