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
+7
View File
@@ -1,5 +1,12 @@
2007-08-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/SOGo/SOGoUser.m ([SOGoUser -language]): change the
algorithm to return, in order, the user's defined language or the
first browser language or, finally, the default language.
([SOGoUser -messageForwarding]): new method that returns the user
preference for message forwarding: "inline" or "attached",
defaulting to "attached".
* SoObjects/Mailer/SOGoMailObject+Draft.m ([SOGoMailObject
-contentForInlineForward]): new method that returns the content of
the message for inline forwarding based on the SOGoMailForward
+1
View File
@@ -103,6 +103,7 @@ extern NSString *SOGoWeekStartFirstFullWeek;
- (NSArray *) mailAccounts;
- (NSArray *) allIdentities;
- (NSDictionary *) primaryIdentity;
- (NSString *) messageForwarding;
/* folders */
+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