diff --git a/ChangeLog b/ChangeLog index 8298567b4..8d667f4b0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-09-05 Wolfgang Sourdeau + * SoObjects/Mailer/SOGoMailObject+Draft.m ([SOGoMailObject + -contentForReply]): if the reply style is outlook, then we use the + content generated for inline forwarding. + * SoObjects/Mailer/SOGoMailFolder.m ([SOGoMailFolder -expungeLastMarkedFolder]): do not perform the expunge if the marked folder is the current folder. diff --git a/SoObjects/Mailer/SOGoMailObject+Draft.m b/SoObjects/Mailer/SOGoMailObject+Draft.m index d733187e2..3983977fd 100644 --- a/SoObjects/Mailer/SOGoMailObject+Draft.m +++ b/SoObjects/Mailer/SOGoMailObject+Draft.m @@ -40,8 +40,22 @@ #define maxFilenameLength 64 +static BOOL inited = NO; +static BOOL useOutlookStyleReplies = NO; + @implementation SOGoMailObject (SOGoDraftObjectExtensions) ++ (void) initialize +{ + NSUserDefaults *ud; + + if (!inited) + { + ud = [NSUserDefaults standardUserDefaults]; + useOutlookStyleReplies = [ud boolForKey: @"SOGoMailUseOutlookStyleReplies"]; + } +} + - (NSString *) subjectForReply { static NSString *replyPrefixes[] = { @@ -132,17 +146,23 @@ - (NSString *) contentForReply { SOGoUser *currentUser; - NSString *pageName; + NSString *pageName, *content; SOGoMailReply *page; - currentUser = [context activeUser]; - pageName = [NSString stringWithFormat: @"SOGoMail%@Reply", - [currentUser language]]; - page = [[WOApplication application] pageWithName: pageName - inContext: context]; - [page setRepliedMail: self]; + if (useOutlookStyleReplies) + content = [self contentForInlineForward]; + else + { + currentUser = [context activeUser]; + pageName = [NSString stringWithFormat: @"SOGoMail%@Reply", + [currentUser language]]; + page = [[WOApplication application] pageWithName: pageName + inContext: context]; + [page setRepliedMail: self]; + content = [[page generateResponse] contentAsString]; + } - return [[page generateResponse] contentAsString]; + return content; } - (NSString *) filenameForForward