diff --git a/ChangeLog b/ChangeLog index 92f50891c..c303dd634 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2012-03-20 Francis Lachapelle + + * SoObjects/Mailer/SOGoMailObject+Draft.m + (_contentForEditingFromKeys:): prefer the HTML part over the text + part when composing HTML messages. + 2012-03-20 Wolfgang Sourdeau * OpenChange/MAPIStoreCalendarMessage.m diff --git a/SOPE/NGCards/iCalCalendar.m b/SOPE/NGCards/iCalCalendar.m index 75b266641..0b6801cd5 100644 --- a/SOPE/NGCards/iCalCalendar.m +++ b/SOPE/NGCards/iCalCalendar.m @@ -101,7 +101,9 @@ - (void) setMethod: (NSString *) _value { - [[self uniqueChildWithTag: @"method"] setSingleValue: _value forKey: @""]; + [[self uniqueChildWithTag: @"method"] + setSingleValue: [_value uppercaseString] + forKey: @""]; } - (NSString *) method diff --git a/SoObjects/Mailer/SOGoMailObject+Draft.m b/SoObjects/Mailer/SOGoMailObject+Draft.m index e27cac368..b0aec21ed 100644 --- a/SoObjects/Mailer/SOGoMailObject+Draft.m +++ b/SoObjects/Mailer/SOGoMailObject+Draft.m @@ -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) { diff --git a/Version b/Version index 09503ebca..edc60fbcd 100644 --- a/Version +++ b/Version @@ -2,6 +2,6 @@ # This file is included by library makefiles to set the version information # of the executable. -MAJOR_VERSION=2 -MINOR_VERSION=0 -SUBMINOR_VERSION=0 +MAJOR_VERSION=1 +MINOR_VERSION=3 +SUBMINOR_VERSION=14