From 0056906629206f6b635b5fe56dc2b413f73eb2c6 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 23 Feb 2012 23:34:26 +0000 Subject: [PATCH] Monotone-Parent: a1668784bf0e7d4c0f6537e4fd960651c40e912b Monotone-Revision: 4820885b1e556f6d0177021967d8b07cb1154aff Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-02-23T23:34:26 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ OpenChange/MAPIStoreMailContext.m | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d24d4e055..a8a6c3580 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2012-02-23 Wolfgang Sourdeau + * OpenChange/MAPIStoreMailContext.m + (+listContextsForUser:withTDBIndexing:inMemCtx:): added back + "trashName". + * SoObjects/Appointments/SOGoCalendarComponent.m (-sendEMailUsingTemplateNamed:forObject:previousObject:toAttendees:withType:): added a "msgType" parameter that is added as value to the new diff --git a/OpenChange/MAPIStoreMailContext.m b/OpenChange/MAPIStoreMailContext.m index ebfe462f7..f42f331c9 100644 --- a/OpenChange/MAPIStoreMailContext.m +++ b/OpenChange/MAPIStoreMailContext.m @@ -84,7 +84,7 @@ MakeDisplayFolderName (NSString *folderName) inMemCtx: (TALLOC_CTX *) memCtx { struct mapistore_contexts_list *firstContext = NULL, *context; - NSString *urlBase, *stringData, *currentName, *inboxName, *draftsName, *sentName; + NSString *urlBase, *stringData, *currentName, *inboxName, *draftsName, *sentName, *trashName; NSArray *unprefixedFolders; NSMutableArray *secondaryFolders; enum mapistore_context_role role[] = {MAPISTORE_MAIL_ROLE, @@ -116,6 +116,13 @@ MakeDisplayFolderName (NSString *folderName) [unprefixedFolders componentsJoinedByString: @"/folder"]]; folderName[2] = sentName; + /* Note: trash is not used as a mail folder, since "Deleted Items" makes use of + the fallback context */ + unprefixedFolders = [[accountFolder trashFolderNameInContext: woContext] + componentsSeparatedByString: @"/"]; + trashName = [NSString stringWithFormat: @"folder%@", + [unprefixedFolders componentsJoinedByString: @"/folder"]]; + urlBase = [NSString stringWithFormat: @"sogo://%@:%@@mail/", userName, userName]; for (count = 0; count < 3; count++) {