Monotone-Parent: 25391f65ab0c40a0befe20a95f03ca78a76d4cfc
Monotone-Revision: cf8aaf24a7987c304ec874bef6f30569d338c805 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-08-27T19:59:39 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
045e3d12f2
commit
8e6a6950da
|
@ -1,3 +1,9 @@
|
|||
2008-08-27 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/Mailer/SOGoMailBodyPart.m ([SOGoMailBodyPart
|
||||
-lookupImap4BodyPartKey:inContext:]): if the "parts" object is not
|
||||
found, we try "body"->"parts".
|
||||
|
||||
2008-08-26 Francis Lachapelle <flachapelle@inverse.ca>
|
||||
|
||||
* UI/MailerUI/UIxMailMainFrame.m ([composeAction]): build the
|
||||
|
|
|
@ -87,13 +87,15 @@ static BOOL debugOn = NO;
|
|||
|
||||
/* hierarchy */
|
||||
|
||||
- (SOGoMailObject *)mailObject {
|
||||
- (SOGoMailObject *) mailObject
|
||||
{
|
||||
return [[self container] mailObject];
|
||||
}
|
||||
|
||||
/* IMAP4 */
|
||||
|
||||
- (NSString *)bodyPartName {
|
||||
- (NSString *) bodyPartName
|
||||
{
|
||||
NSString *s;
|
||||
NSRange r;
|
||||
|
||||
|
@ -104,7 +106,8 @@ static BOOL debugOn = NO;
|
|||
return [s substringToIndex:r.location];
|
||||
}
|
||||
|
||||
- (NSArray *)bodyPartPath {
|
||||
- (NSArray *) bodyPartPath
|
||||
{
|
||||
NSMutableArray *p;
|
||||
id obj;
|
||||
|
||||
|
@ -122,7 +125,8 @@ static BOOL debugOn = NO;
|
|||
return pathToPart;
|
||||
}
|
||||
|
||||
- (NSString *)bodyPartIdentifier {
|
||||
- (NSString *) bodyPartIdentifier
|
||||
{
|
||||
if (identifier != nil)
|
||||
return [identifier isNotNull] ? identifier : nil;
|
||||
|
||||
|
@ -131,19 +135,23 @@ static BOOL debugOn = NO;
|
|||
return identifier;
|
||||
}
|
||||
|
||||
- (NSURL *)imap4URL {
|
||||
- (NSURL *) imap4URL
|
||||
{
|
||||
/* reuse URL of message */
|
||||
return [[self mailObject] imap4URL];
|
||||
}
|
||||
|
||||
/* part info */
|
||||
|
||||
- (id)partInfo {
|
||||
if (partInfo != nil)
|
||||
return [partInfo isNotNull] ? partInfo : nil;
|
||||
- (id) partInfo
|
||||
{
|
||||
if (!partInfo)
|
||||
{
|
||||
partInfo
|
||||
= [[self mailObject] lookupInfoForBodyPart: [self bodyPartPath]];
|
||||
[partInfo retain];
|
||||
}
|
||||
|
||||
partInfo =
|
||||
[[[self mailObject] lookupInfoForBodyPart:[self bodyPartPath]] retain];
|
||||
return partInfo;
|
||||
}
|
||||
|
||||
|
@ -157,10 +165,14 @@ static BOOL debugOn = NO;
|
|||
NSArray *subParts;
|
||||
unsigned int nbr;
|
||||
id obj;
|
||||
NSDictionary *subPart;
|
||||
NSDictionary *subPart, *infos;
|
||||
|
||||
nbr = [key intValue];
|
||||
subParts = [[self partInfo] objectForKey: @"parts"];
|
||||
infos = [self partInfo];
|
||||
subParts = [infos objectForKey: @"parts"];
|
||||
if (!subParts)
|
||||
subParts = [[infos objectForKey: @"body"] objectForKey: @"parts"];
|
||||
|
||||
if (nbr > 0 && nbr < ([subParts count] + 1))
|
||||
{
|
||||
subPart = [subParts objectAtIndex: nbr - 1];
|
||||
|
|
Loading…
Reference in a new issue