mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-18 21:15:57 +00:00
propagate from branch 'ca.inverse.sogo.1_3_14' (head 20fe3869b4c2b451d086944d0be00758c4b807f0)
to branch 'ca.inverse.sogo' (head 0917b3278898caa0cb56a12a960275816f5ab396) Monotone-Parent: 0917b3278898caa0cb56a12a960275816f5ab396 Monotone-Parent: 20fe3869b4c2b451d086944d0be00758c4b807f0 Monotone-Revision: 73343e195be838a68cfbeb8edc978d8273b1e6da Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-03-20T20:29:39 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2012-03-20 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* SoObjects/Mailer/SOGoMailObject+Draft.m
|
||||
(_contentForEditingFromKeys:): prefer the HTML part over the text
|
||||
part when composing HTML messages.
|
||||
|
||||
2012-03-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreCalendarMessage.m
|
||||
|
||||
@@ -101,7 +101,9 @@
|
||||
|
||||
- (void) setMethod: (NSString *) _value
|
||||
{
|
||||
[[self uniqueChildWithTag: @"method"] setSingleValue: _value forKey: @""];
|
||||
[[self uniqueChildWithTag: @"method"]
|
||||
setSingleValue: [_value uppercaseString]
|
||||
forKey: @""];
|
||||
}
|
||||
|
||||
- (NSString *) method
|
||||
|
||||
@@ -98,22 +98,38 @@
|
||||
NSArray *types;
|
||||
NSDictionary *parts;
|
||||
NSString *rawPart, *content, *contentKey;
|
||||
SOGoUserDefaults *ud;
|
||||
int index;
|
||||
BOOL htmlContent;
|
||||
BOOL htmlComposition, htmlContent;
|
||||
|
||||
content = @"";
|
||||
|
||||
if ([keys count])
|
||||
{
|
||||
ud = [[context activeUser] userDefaults];
|
||||
htmlComposition = [[ud mailComposeMessageType] isEqualToString: @"html"];
|
||||
htmlContent = NO;
|
||||
types = [keys objectsForKey: @"mimeType" notFoundMarker: @""];
|
||||
index = [types indexOfObject: @"text/plain"];
|
||||
if (index == NSNotFound)
|
||||
|
||||
if (htmlComposition)
|
||||
{
|
||||
// Prefer HTML content
|
||||
index = [types indexOfObject: @"text/html"];
|
||||
htmlContent = YES;
|
||||
if (index == NSNotFound)
|
||||
index = [types indexOfObject: @"text/plain"];
|
||||
else
|
||||
htmlContent = YES;
|
||||
}
|
||||
else
|
||||
htmlContent = NO;
|
||||
{
|
||||
// Prefer text content
|
||||
index = [types indexOfObject: @"text/plain"];
|
||||
if (index == NSNotFound)
|
||||
{
|
||||
index = [types indexOfObject: @"text/html"];
|
||||
htmlContent = YES;
|
||||
}
|
||||
}
|
||||
|
||||
if (index != NSNotFound)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user