Monotone-Parent: 054094f9b080f4f9f4cda29e0be81cf14681bb8e
Monotone-Revision: 2b06dc463d88e9e0940158ceccab067e7cc497f7 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-09-05T15:29:42 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
6978ea95c5
commit
0e1504416a
|
@ -3,6 +3,8 @@
|
||||||
* SoObjects/Mailer/SOGoMailObject+Draft.m ([SOGoMailObject
|
* SoObjects/Mailer/SOGoMailObject+Draft.m ([SOGoMailObject
|
||||||
-contentForReply]): if the reply style is outlook, then we use the
|
-contentForReply]): if the reply style is outlook, then we use the
|
||||||
content generated for inline forwarding.
|
content generated for inline forwarding.
|
||||||
|
([SOGoMailObject -useOutlookStyleReplies]): new method that
|
||||||
|
indicates whether the ud key "SOGoMailUseOutlookStyleReplies".
|
||||||
|
|
||||||
* SoObjects/Mailer/SOGoMailFolder.m ([SOGoMailFolder
|
* SoObjects/Mailer/SOGoMailFolder.m ([SOGoMailFolder
|
||||||
-expungeLastMarkedFolder]): do not perform the expunge if the
|
-expungeLastMarkedFolder]): do not perform the expunge if the
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#import <Foundation/NSArray.h>
|
#import <Foundation/NSArray.h>
|
||||||
#import <Foundation/NSDictionary.h>
|
#import <Foundation/NSDictionary.h>
|
||||||
#import <Foundation/NSEnumerator.h>
|
#import <Foundation/NSEnumerator.h>
|
||||||
|
#import <Foundation/NSUserDefaults.h>
|
||||||
|
|
||||||
#import <NGObjWeb/WOApplication.h>
|
#import <NGObjWeb/WOApplication.h>
|
||||||
#import <NGObjWeb/WOResponse.h>
|
#import <NGObjWeb/WOResponse.h>
|
||||||
|
@ -40,16 +41,20 @@
|
||||||
|
|
||||||
#define maxFilenameLength 64
|
#define maxFilenameLength 64
|
||||||
|
|
||||||
static BOOL useOutlookStyleReplies = NO;
|
|
||||||
|
|
||||||
@implementation SOGoMailObject (SOGoDraftObjectExtensions)
|
@implementation SOGoMailObject (SOGoDraftObjectExtensions)
|
||||||
|
|
||||||
+ (void) initialize
|
- (BOOL) useOutlookStyleReplies
|
||||||
{
|
{
|
||||||
NSUserDefaults *ud;
|
NSUserDefaults *ud;
|
||||||
|
static int useOutlookStyleReplies = -1;
|
||||||
|
|
||||||
|
if (useOutlookStyleReplies == -1)
|
||||||
|
{
|
||||||
ud = [NSUserDefaults standardUserDefaults];
|
ud = [NSUserDefaults standardUserDefaults];
|
||||||
useOutlookStyleReplies = [ud boolForKey: @"SOGoMailUseOutlookStyleReplies"];
|
useOutlookStyleReplies = [ud boolForKey: @"SOGoMailUseOutlookStyleReplies"];
|
||||||
|
}
|
||||||
|
|
||||||
|
return (useOutlookStyleReplies);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) subjectForReply
|
- (NSString *) subjectForReply
|
||||||
|
@ -142,11 +147,11 @@ static BOOL useOutlookStyleReplies = NO;
|
||||||
- (NSString *) contentForReply
|
- (NSString *) contentForReply
|
||||||
{
|
{
|
||||||
SOGoUser *currentUser;
|
SOGoUser *currentUser;
|
||||||
NSString *pageName, *content;
|
NSString *pageName, *replyContent;
|
||||||
SOGoMailReply *page;
|
SOGoMailReply *page;
|
||||||
|
|
||||||
if (useOutlookStyleReplies)
|
if ([self useOutlookStyleReplies])
|
||||||
content = [self contentForInlineForward];
|
replyContent = [self contentForInlineForward];
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
currentUser = [context activeUser];
|
currentUser = [context activeUser];
|
||||||
|
@ -155,10 +160,10 @@ static BOOL useOutlookStyleReplies = NO;
|
||||||
page = [[WOApplication application] pageWithName: pageName
|
page = [[WOApplication application] pageWithName: pageName
|
||||||
inContext: context];
|
inContext: context];
|
||||||
[page setRepliedMail: self];
|
[page setRepliedMail: self];
|
||||||
content = [[page generateResponse] contentAsString];
|
replyContent = [[page generateResponse] contentAsString];
|
||||||
}
|
}
|
||||||
|
|
||||||
return content;
|
return replyContent;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) filenameForForward
|
- (NSString *) filenameForForward
|
||||||
|
|
Loading…
Reference in a new issue