mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-25 05:15:25 +00:00
Monotone-Parent: 900c2fea2ca39298eafa8b0fec2a559eb880485e
Monotone-Revision: c67e427796baa4f88cc5eb37a7574db9c4fb14a3 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-12-30T14:41:58 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
2010-12-30 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreSentItemsContext.[hm]: class is now derived
|
||||
from MAPIStoreMailContext and set up its module folder to the
|
||||
user-configured sentFolder of his/her default account.
|
||||
|
||||
* OpenChange/MAPIStoreMailFolderTable.[hm]: new class module
|
||||
subclassed from MAPIStoreFolderTable, that provides the interface
|
||||
for folders in MAPIStoreMailContext.
|
||||
|
||||
@@ -23,9 +23,9 @@
|
||||
#ifndef MAPISTORESEARCHCONTEXT_H
|
||||
#define MAPISTORESEARCHCONTEXT_H
|
||||
|
||||
#import "MAPIStoreFileSystemBaseContext.h"
|
||||
#import "MAPIStoreMailContext.h"
|
||||
|
||||
@interface MAPIStoreSentItemsContext : MAPIStoreFileSystemBaseContext
|
||||
@interface MAPIStoreSentItemsContext : MAPIStoreMailContext
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@@ -22,6 +22,15 @@
|
||||
|
||||
#import <Foundation/NSString.h>
|
||||
|
||||
#import <NGObjWeb/WOContext+SoObjects.h>
|
||||
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
|
||||
#import <Mailer/SOGoMailAccount.h>
|
||||
|
||||
#import "MAPIApplication.h"
|
||||
#import "MAPIStoreAuthenticator.h"
|
||||
|
||||
#import "MAPIStoreMapping.h"
|
||||
|
||||
#import "MAPIStoreSentItemsContext.h"
|
||||
@@ -39,4 +48,40 @@
|
||||
withID: 0x140001];
|
||||
}
|
||||
|
||||
- (void) setupModuleFolder
|
||||
{
|
||||
SOGoUserFolder *userFolder;
|
||||
SOGoMailAccounts *accountsFolder;
|
||||
SOGoMailAccount *accountFolder;
|
||||
SOGoFolder *currentContainer;
|
||||
|
||||
userFolder = [SOGoUserFolder objectWithName: [authenticator username]
|
||||
inContainer: MAPIApp];
|
||||
[parentFoldersBag addObject: userFolder];
|
||||
// [self logWithFormat: @"userFolder: %@", userFolder];
|
||||
[woContext setClientObject: userFolder];
|
||||
|
||||
accountsFolder = [userFolder lookupName: @"Mail"
|
||||
inContext: woContext
|
||||
acquire: NO];
|
||||
[parentFoldersBag addObject: accountsFolder];
|
||||
// [self logWithFormat: @"accountsFolder: %@", accountsFolder];
|
||||
[woContext setClientObject: accountsFolder];
|
||||
|
||||
accountFolder = [accountsFolder lookupName: @"0"
|
||||
inContext: woContext
|
||||
acquire: NO];
|
||||
[parentFoldersBag addObject: accountFolder];
|
||||
[woContext setClientObject: accountFolder];
|
||||
|
||||
moduleFolder = [accountFolder sentFolderInContext: nil];
|
||||
[moduleFolder retain];
|
||||
currentContainer = [moduleFolder container];
|
||||
while (currentContainer != (SOGoFolder *) accountFolder)
|
||||
{
|
||||
[parentFoldersBag addObject: currentContainer];
|
||||
currentContainer = [currentContainer container];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user