Monotone-Parent: a164259525f718f804b625a9f09b4c3b3c9e83f8

Monotone-Revision: 11f4bdac420d36e45b12ca5d1d393ec34f43c609

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-11-10T00:02:30
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-11-10 00:02:30 +00:00
parent aebac17d01
commit 1eda040e84
13 changed files with 563 additions and 416 deletions
+17 -3
View File
@@ -735,8 +735,22 @@ static BOOL debugSoParts = NO;
{
// TODO: we might want to check for existence prior controller creation
Class clazz;
clazz = [SOGoMailBodyPart bodyPartClassForKey:_key inContext:_ctx];
NSArray *parts;
int part;
NSDictionary *partDesc;
NSString *mimeType;
parts = [[self bodyStructure] objectForKey: @"parts"];
part = [_key intValue] - 1;
if (part > -1 && part < [parts count])
{
partDesc = [parts objectAtIndex: part];
mimeType = [[partDesc keysWithFormat: @"%{type}/%{subtype}"] lowercaseString];
clazz = [SOGoMailBodyPart bodyPartClassForMimeType: mimeType
inContext: _ctx];
}
else
clazz = Nil;
return [clazz objectWithName:_key inContainer: self];
}
@@ -755,7 +769,7 @@ static BOOL debugSoParts = NO;
if ([self isBodyPartKey:_key inContext:_ctx]) {
if ((obj = [self lookupImap4BodyPartKey:_key inContext:_ctx]) != nil) {
if (debugSoParts)
if (debugSoParts)
[self logWithFormat: @"mail looked up part %@: %@", _key, obj];
return obj;
}