From da8c86b685d206bbccada2612ed08de4b22aa121 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 15 Feb 2007 21:02:35 +0000 Subject: [PATCH] Monotone-Parent: 52ff2b4f8e3b54dccdd86d1df03df7ddf6df7a1a Monotone-Revision: 84362f2350a7b9647b853e2a15e4797ea7c589ee Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-02-15T21:02:35 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 3 +++ UI/MailPartViewers/UIxMailPartAlternativeViewer.m | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8bbf9143b..8039c5fc5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2007-02-15 Wolfgang Sourdeau + * UI/MailPartViewers/UIxMailPartAlternativeViewer.m: select the + text/html component before text/plain. + * SoObjects/Mailer/SOGoMailObject.m ([SOGoMailObject -addRequiredKeysOfStructure:path:toArray:recurse:]): accepts the fetching of HTML parts. diff --git a/UI/MailPartViewers/UIxMailPartAlternativeViewer.m b/UI/MailPartViewers/UIxMailPartAlternativeViewer.m index 95e4e2e7a..e7ff28aa1 100644 --- a/UI/MailPartViewers/UIxMailPartAlternativeViewer.m +++ b/UI/MailPartViewers/UIxMailPartAlternativeViewer.m @@ -89,10 +89,11 @@ if ((count = [_types count]) == 0) return NSNotFound; - /* we always choose text/plain if available */ + if ((i = [_types indexOfObject:@"text/html"]) != NSNotFound) + return i; if ((i = [_types indexOfObject:@"text/plain"]) != NSNotFound) return i; - + /* then we scan for other text types and choose the first one found */ for (i = 0; i < count; i++) { if ([(NSString *)[_types objectAtIndex:i] hasPrefix:@"text/"])