Monotone-Parent: 2b06dc463d88e9e0940158ceccab067e7cc497f7
Monotone-Revision: 81f6f619789306a73dc061a36ac5b92bc8ecaac6 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-09-05T15:55:03 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
0e1504416a
commit
627c07b01f
|
@ -1,10 +1,18 @@
|
|||
2008-09-05 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Mailer/SOGoMailForward.m ([SOGoMailForward -init]):
|
||||
added a "replyMode" ivar, used for outlook-style replying.
|
||||
([SOGoMailForward -messageBody]): if used in "reply mode", quote
|
||||
the returned body.
|
||||
|
||||
* 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".
|
||||
([SOGoMailObject -contentForOutlookReply]): new method, derived
|
||||
from -contentForInlineForward but set the forward template in
|
||||
reply-mode, to get the text in quoted form.
|
||||
|
||||
* SoObjects/Mailer/SOGoMailFolder.m ([SOGoMailFolder
|
||||
-expungeLastMarkedFolder]): do not perform the expunge if the
|
||||
|
|
|
@ -32,9 +32,11 @@
|
|||
SOGoMailObject *sourceMail;
|
||||
NSString *field;
|
||||
NSString *currentValue;
|
||||
BOOL replyMode;
|
||||
}
|
||||
|
||||
- (void) setForwardedMail: (SOGoMailObject *) newSourceMail;
|
||||
- (void) setReplyMode: (BOOL) newReplyMode;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
*/
|
||||
|
||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||
#import <NGExtensions/NSString+misc.h>
|
||||
|
||||
#import <SoObjects/SOGo/SOGoDateFormatter.h>
|
||||
#import <SoObjects/SOGo/SOGoUser.h>
|
||||
|
@ -36,6 +37,7 @@
|
|||
{
|
||||
sourceMail = nil;
|
||||
currentValue = nil;
|
||||
replyMode = NO;
|
||||
}
|
||||
|
||||
return self;
|
||||
|
@ -53,6 +55,11 @@
|
|||
ASSIGN (sourceMail, newSourceMail);
|
||||
}
|
||||
|
||||
- (void) setReplyMode: (BOOL) newReplyMode
|
||||
{
|
||||
replyMode = newReplyMode;
|
||||
}
|
||||
|
||||
- (NSString *) subject
|
||||
{
|
||||
return [sourceMail decodedSubject];
|
||||
|
@ -146,7 +153,15 @@
|
|||
|
||||
- (NSString *) messageBody
|
||||
{
|
||||
return [sourceMail contentForEditing];
|
||||
NSString *messageBody;
|
||||
|
||||
if (replyMode)
|
||||
messageBody
|
||||
= [[sourceMail contentForEditing] stringByApplyingMailQuoting];
|
||||
else
|
||||
messageBody = [sourceMail contentForEditing];
|
||||
|
||||
return messageBody;
|
||||
}
|
||||
|
||||
- (NSString *) signature
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
|
||||
- (NSString *) subjectForReply;
|
||||
- (NSString *) contentForReply;
|
||||
- (NSString *) contentForOutlookReply;
|
||||
|
||||
- (NSString *) subjectForForward;
|
||||
- (NSString *) filenameForForward;
|
||||
|
|
|
@ -88,7 +88,6 @@
|
|||
return newSubject;
|
||||
}
|
||||
|
||||
|
||||
- (NSString *) _contentForEditingFromKeys: (NSArray *) keys
|
||||
{
|
||||
NSArray *types;
|
||||
|
@ -126,7 +125,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
|
@ -151,7 +150,7 @@
|
|||
SOGoMailReply *page;
|
||||
|
||||
if ([self useOutlookStyleReplies])
|
||||
replyContent = [self contentForInlineForward];
|
||||
replyContent = [self contentForOutlookReply];
|
||||
else
|
||||
{
|
||||
currentUser = [context activeUser];
|
||||
|
@ -166,6 +165,23 @@
|
|||
return replyContent;
|
||||
}
|
||||
|
||||
- (NSString *) contentForOutlookReply
|
||||
{
|
||||
SOGoUser *currentUser;
|
||||
NSString *pageName;
|
||||
SOGoMailForward *page;
|
||||
|
||||
currentUser = [context activeUser];
|
||||
pageName = [NSString stringWithFormat: @"SOGoMail%@Forward",
|
||||
[currentUser language]];
|
||||
page = [[WOApplication application] pageWithName: pageName
|
||||
inContext: context];
|
||||
[page setForwardedMail: self];
|
||||
[page setReplyMode: YES];
|
||||
|
||||
return [[page generateResponse] contentAsString];
|
||||
}
|
||||
|
||||
- (NSString *) filenameForForward
|
||||
{
|
||||
NSString *subject;
|
||||
|
@ -224,6 +240,7 @@
|
|||
page = [[WOApplication application] pageWithName: pageName
|
||||
inContext: context];
|
||||
[page setForwardedMail: self];
|
||||
[page setReplyMode: NO];
|
||||
|
||||
return [[page generateResponse] contentAsString];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue