Monotone-Parent: 283b38ddff29574db2599411b54c62d3643b3b5a
Monotone-Revision: 035a671feed8f154d8e786d8b3761b3e87ac550d Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2011-08-04T15:54:05 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
3a2ed5bb43
commit
f3ddb81591
|
@ -5,6 +5,7 @@
|
|||
Made module able to handle SOGoMailObject as well, since we can
|
||||
possibly have such objects as value for sogoObject.
|
||||
(-getPrImportance:inMemCtx:): overriden method.
|
||||
(-getPrReceivedByEmailAddress:inMemCtx:): overriden method.
|
||||
|
||||
* OpenChange/MAPIApplication.m (+isCachingEnabled): new overriden
|
||||
method that returns "NO" in order to avoid leaking dictionaries
|
||||
|
|
|
@ -309,6 +309,44 @@ e)
|
|||
[self _saveAttachment: [attachmentKeys objectAtIndex: count]];
|
||||
}
|
||||
|
||||
- (int) getPrReceivedByEmailAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
NSString *stringValue;
|
||||
NGMailAddress *currentAddress;
|
||||
NGMailAddressParser *parser;
|
||||
NSArray *to;
|
||||
|
||||
if ([sogoObject isKindOfClass: SOGoDraftObjectK])
|
||||
{
|
||||
stringValue = @"";
|
||||
|
||||
if (!headerSetup)
|
||||
{
|
||||
[sogoObject fetchInfo];
|
||||
headerSetup = YES;
|
||||
}
|
||||
|
||||
to = [[sogoObject headers] objectForKey: @"to"];
|
||||
if ([to count] > 0)
|
||||
{
|
||||
parser = [NGMailAddressParser
|
||||
mailAddressParserWithString: [to objectAtIndex: 0]];
|
||||
currentAddress = [parser parse];
|
||||
if ([currentAddress isKindOfClass: NGMailAddressK])
|
||||
{
|
||||
stringValue = [currentAddress address];
|
||||
if (!stringValue)
|
||||
stringValue = @"";
|
||||
}
|
||||
}
|
||||
*data = [stringValue asUnicodeInMemCtx: memCtx];
|
||||
}
|
||||
else
|
||||
[super getPrReceivedByEmailAddress: data inMemCtx: memCtx];
|
||||
|
||||
return MAPISTORE_SUCCESS;
|
||||
}
|
||||
|
||||
- (NSArray *) attachmentKeysMatchingQualifier: (EOQualifier *) qualifier
|
||||
andSortOrderings: (NSArray *) sortOrderings
|
||||
|
|
|
@ -52,6 +52,8 @@
|
|||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPrImportance: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
- (int) getPrReceivedByEmailAddress: (void **) data
|
||||
inMemCtx: (TALLOC_CTX *) memCtx;
|
||||
|
||||
@end
|
||||
|
||||
|
|
Loading…
Reference in a new issue