see changelog
Monotone-Parent: 1011e8e7cab7e718b62aa03f637fa6a37349d95c Monotone-Revision: 06aa9d65ffbfa422bd62686e09571834da68af2f Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2007-11-25T17:26:56 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
047010bfa4
commit
c08f067ee9
29
ChangeLog
29
ChangeLog
|
@ -1,3 +1,32 @@
|
|||
2007-11-25 Ludovic Marcotte <ludovic@inverse.ca>
|
||||
|
||||
* SoObjects/Mailer/SOGoMailForward.m
|
||||
Use [sourceMail decodedSubject] instead of [sourceMail subject]
|
||||
Signature fix in -signature - see the comment
|
||||
for SOGoMailReply.
|
||||
|
||||
* SoObjects/Mailer/SOGoMailObject.m
|
||||
Improved -stringFromData: to try UTF-8 then fallback to Latin1
|
||||
|
||||
* SoObjects/Mailer/SOGoMailReply.m
|
||||
Modified -messageBody to strip the signature from the reply.
|
||||
Also modified -signature to add "-- \n%@" instead of the
|
||||
broken ""--\r\n%@" pattern.
|
||||
|
||||
* UI/MailPartViewers/UIxMailPartAlternativeViewer.m
|
||||
We now favor text/calendar parts over text/html and
|
||||
text/plain parts when viewing a multipart/alternative mail.
|
||||
This allows us to show the email invitations coming from
|
||||
Microsoft Outlook.
|
||||
|
||||
* UI/MailerUI/UIxMailAccountActions.m
|
||||
Signature fix in -composeAction - see the comment
|
||||
for SOGoMailReply.
|
||||
|
||||
* UI/MailPartViewers/UIxMailPartViewer.m
|
||||
Modified -flatContentAsString to use UTF-8 as the
|
||||
default fallback encoding for 8-bit content.
|
||||
|
||||
2007-11-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/MailPartViewers/UIxMailRenderingContext.m
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
|
||||
- (NSString *) subject
|
||||
{
|
||||
return [sourceMail subject];
|
||||
return [sourceMail decodedSubject];
|
||||
}
|
||||
|
||||
- (NSString *) date
|
||||
|
@ -155,7 +155,7 @@
|
|||
|
||||
signature = [[context activeUser] signature];
|
||||
if ([signature length])
|
||||
mailSignature = [NSString stringWithFormat: @"--\r\n%@", signature];
|
||||
mailSignature = [NSString stringWithFormat: @"-- \n%@", signature];
|
||||
else
|
||||
mailSignature = @"";
|
||||
|
||||
|
|
|
@ -659,18 +659,22 @@ static BOOL debugSoParts = NO;
|
|||
charset = [[_info valueForKey: @"parameterList"] valueForKey: @"charset"];
|
||||
if (![charset length])
|
||||
{
|
||||
s = [[NSString alloc] initWithData: mailData encoding: NSUTF8StringEncoding];
|
||||
[s autorelease];
|
||||
s = nil;
|
||||
}
|
||||
else
|
||||
{
|
||||
s = [NSString stringWithData: mailData usingEncodingNamed: charset];
|
||||
}
|
||||
|
||||
// If it has failed, we try at least using UTF-8. Normally, this can NOT fail.
|
||||
// Unfortunately, it seems to fail under GNUstep so we try latin1 if that's
|
||||
// the case
|
||||
if (!s)
|
||||
s = [[[NSString alloc] initWithData: mailData encoding: NSUTF8StringEncoding] autorelease];
|
||||
|
||||
// If it has failed, we try at least using UTF-8. Normally, this can NOT fail
|
||||
if (!s)
|
||||
s = [[[NSString alloc] initWithData: mailData encoding: NSISOLatin1StringEncoding] autorelease];
|
||||
}
|
||||
}
|
||||
else
|
||||
s = nil;
|
||||
|
||||
|
|
|
@ -70,7 +70,21 @@
|
|||
|
||||
- (NSString *) messageBody
|
||||
{
|
||||
return [[sourceMail contentForEditing] stringByApplyingMailQuoting];
|
||||
NSString *s;
|
||||
|
||||
s = [sourceMail contentForEditing];
|
||||
|
||||
if (s)
|
||||
{
|
||||
NSRange r;
|
||||
|
||||
r = [s rangeOfString: @"\n-- \n" options: NSBackwardsSearch];
|
||||
|
||||
if (r.length)
|
||||
s = [s substringToIndex: r.location];
|
||||
}
|
||||
|
||||
return [s stringByApplyingMailQuoting];
|
||||
}
|
||||
|
||||
- (NSString *) signature
|
||||
|
@ -79,7 +93,7 @@
|
|||
|
||||
signature = [[context activeUser] signature];
|
||||
if ([signature length])
|
||||
mailSignature = [NSString stringWithFormat: @"--\r\n%@", signature];
|
||||
mailSignature = [NSString stringWithFormat: @"-- \n%@", signature];
|
||||
else
|
||||
mailSignature = @"";
|
||||
|
||||
|
|
|
@ -92,6 +92,8 @@
|
|||
if ((count = [_types count]) == 0)
|
||||
return NSNotFound;
|
||||
|
||||
if ((i = [_types indexOfObject:@"text/calendar"]) != NSNotFound)
|
||||
return i;
|
||||
if ((i = [_types indexOfObject:@"text/html"]) != NSNotFound)
|
||||
return i;
|
||||
if ((i = [_types indexOfObject:@"text/plain"]) != NSNotFound)
|
||||
|
|
|
@ -183,10 +183,9 @@
|
|||
s = [NSString stringWithData: content usingEncodingNamed: charset];
|
||||
if (![s length])
|
||||
{
|
||||
/* latin 1 is used as a 8bit fallback charset... but does this
|
||||
encoding accept any byte from 0 to 255? */
|
||||
/* UTF-8 is used as a 8bit fallback charset... */
|
||||
s = [[NSString alloc] initWithData: content
|
||||
encoding: NSISOLatin1StringEncoding];
|
||||
encoding: NSUTF8StringEncoding];
|
||||
[s autorelease];
|
||||
}
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@
|
|||
if ([signature length])
|
||||
{
|
||||
[newDraftMessage
|
||||
setText: [NSString stringWithFormat: @"\r\n--\r\n%@", signature]];
|
||||
setText: [NSString stringWithFormat: @"\n-- \n%@", signature]];
|
||||
save = YES;
|
||||
}
|
||||
if (save)
|
||||
|
|
Loading…
Reference in New Issue