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