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>
|
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
|
* 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
|
([SOGoMailObject -useOutlookStyleReplies]): new method that
|
||||||
indicates whether the ud key "SOGoMailUseOutlookStyleReplies".
|
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
|
* SoObjects/Mailer/SOGoMailFolder.m ([SOGoMailFolder
|
||||||
-expungeLastMarkedFolder]): do not perform the expunge if the
|
-expungeLastMarkedFolder]): do not perform the expunge if the
|
||||||
|
|
|
@ -32,9 +32,11 @@
|
||||||
SOGoMailObject *sourceMail;
|
SOGoMailObject *sourceMail;
|
||||||
NSString *field;
|
NSString *field;
|
||||||
NSString *currentValue;
|
NSString *currentValue;
|
||||||
|
BOOL replyMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setForwardedMail: (SOGoMailObject *) newSourceMail;
|
- (void) setForwardedMail: (SOGoMailObject *) newSourceMail;
|
||||||
|
- (void) setReplyMode: (BOOL) newReplyMode;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||||
|
#import <NGExtensions/NSString+misc.h>
|
||||||
|
|
||||||
#import <SoObjects/SOGo/SOGoDateFormatter.h>
|
#import <SoObjects/SOGo/SOGoDateFormatter.h>
|
||||||
#import <SoObjects/SOGo/SOGoUser.h>
|
#import <SoObjects/SOGo/SOGoUser.h>
|
||||||
|
@ -36,6 +37,7 @@
|
||||||
{
|
{
|
||||||
sourceMail = nil;
|
sourceMail = nil;
|
||||||
currentValue = nil;
|
currentValue = nil;
|
||||||
|
replyMode = NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
|
@ -53,6 +55,11 @@
|
||||||
ASSIGN (sourceMail, newSourceMail);
|
ASSIGN (sourceMail, newSourceMail);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) setReplyMode: (BOOL) newReplyMode
|
||||||
|
{
|
||||||
|
replyMode = newReplyMode;
|
||||||
|
}
|
||||||
|
|
||||||
- (NSString *) subject
|
- (NSString *) subject
|
||||||
{
|
{
|
||||||
return [sourceMail decodedSubject];
|
return [sourceMail decodedSubject];
|
||||||
|
@ -146,7 +153,15 @@
|
||||||
|
|
||||||
- (NSString *) messageBody
|
- (NSString *) messageBody
|
||||||
{
|
{
|
||||||
return [sourceMail contentForEditing];
|
NSString *messageBody;
|
||||||
|
|
||||||
|
if (replyMode)
|
||||||
|
messageBody
|
||||||
|
= [[sourceMail contentForEditing] stringByApplyingMailQuoting];
|
||||||
|
else
|
||||||
|
messageBody = [sourceMail contentForEditing];
|
||||||
|
|
||||||
|
return messageBody;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) signature
|
- (NSString *) signature
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
|
|
||||||
- (NSString *) subjectForReply;
|
- (NSString *) subjectForReply;
|
||||||
- (NSString *) contentForReply;
|
- (NSString *) contentForReply;
|
||||||
|
- (NSString *) contentForOutlookReply;
|
||||||
|
|
||||||
- (NSString *) subjectForForward;
|
- (NSString *) subjectForForward;
|
||||||
- (NSString *) filenameForForward;
|
- (NSString *) filenameForForward;
|
||||||
|
|
|
@ -88,7 +88,6 @@
|
||||||
return newSubject;
|
return newSubject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
- (NSString *) _contentForEditingFromKeys: (NSArray *) keys
|
- (NSString *) _contentForEditingFromKeys: (NSArray *) keys
|
||||||
{
|
{
|
||||||
NSArray *types;
|
NSArray *types;
|
||||||
|
@ -151,7 +150,7 @@
|
||||||
SOGoMailReply *page;
|
SOGoMailReply *page;
|
||||||
|
|
||||||
if ([self useOutlookStyleReplies])
|
if ([self useOutlookStyleReplies])
|
||||||
replyContent = [self contentForInlineForward];
|
replyContent = [self contentForOutlookReply];
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
currentUser = [context activeUser];
|
currentUser = [context activeUser];
|
||||||
|
@ -166,6 +165,23 @@
|
||||||
return replyContent;
|
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 *) filenameForForward
|
||||||
{
|
{
|
||||||
NSString *subject;
|
NSString *subject;
|
||||||
|
@ -224,6 +240,7 @@
|
||||||
page = [[WOApplication application] pageWithName: pageName
|
page = [[WOApplication application] pageWithName: pageName
|
||||||
inContext: context];
|
inContext: context];
|
||||||
[page setForwardedMail: self];
|
[page setForwardedMail: self];
|
||||||
|
[page setReplyMode: NO];
|
||||||
|
|
||||||
return [[page generateResponse] contentAsString];
|
return [[page generateResponse] contentAsString];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue