See ChangeLog

Monotone-Parent: 28270e2fb73b9d6d39fb855a68f0d46bcbf364db
Monotone-Revision: 5b741965d2e2101564907ff80f19b932fae6f8d1

Monotone-Author: ludovic@Sophos.ca
Monotone-Date: 2011-04-21T16:02:31
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Ludovic Marcotte
2011-04-21 16:02:31 +00:00
parent 6572fcf6ff
commit 359bc181d7
25 changed files with 154 additions and 28 deletions
+4
View File
@@ -57,6 +57,8 @@ typedef enum {
SOGoTrashFolder *trashFolder;
SOGoIMAPAclStyle imapAclStyle;
NSMutableArray *identities;
NSString *otherUsersFolderName;
NSString *sharedFoldersName;
}
- (SOGoIMAPAclStyle) imapAclStyle;
@@ -81,6 +83,8 @@ typedef enum {
- (NSString *) draftsFolderNameInContext: (id)_ctx;
- (NSString *) sentFolderNameInContext: (id)_ctx;
- (NSString *) trashFolderNameInContext: (id)_ctx;
- (NSString *) otherUsersFolderNameInContext: (id)_ctx;
- (NSString *) sharedFoldersNameInContext: (id)_ctx;
- (SOGoMailFolder *) inboxFolderInContext: (id)_ctx;
- (SOGoDraftsFolder *) draftsFolderInContext: (id)_ctx;
+32 -2
View File
@@ -72,6 +72,8 @@ static NSString *sieveScriptName = @"sogo";
trashFolder = nil;
imapAclStyle = undefined;
identities = nil;
otherUsersFolderName = nil;
sharedFoldersName = nil;
}
return self;
@@ -84,6 +86,8 @@ static NSString *sieveScriptName = @"sogo";
[sentFolder release];
[trashFolder release];
[identities release];
[otherUsersFolderName release];
[sharedFoldersName release];
[super dealloc];
}
@@ -120,17 +124,33 @@ static NSString *sieveScriptName = @"sogo";
NSArray *namespace;
NGImap4Client *client;
SOGoUser *user;
NSArray *accounts;
NSDictionary *account;
user = [SOGoUser userWithLogin: [self ownerInContext: nil]];
accounts = [user mailAccounts];
account = [accounts objectAtIndex: [nameInContainer intValue]];
client = [[self imap4Connection] client];
namespaceDict = [client namespace];
namespace = [namespaceDict objectForKey: @"personal"];
if (namespace)
[self _appendNamespace: namespace toFolders: folders];
namespace = [namespaceDict objectForKey: @"other users"];
if (namespace)
[self _appendNamespace: namespace toFolders: folders];
{
[self _appendNamespace: namespace toFolders: folders];
ASSIGN(otherUsersFolderName, [folders lastObject]);
}
namespace = [namespaceDict objectForKey: @"shared"];
if (namespace)
[self _appendNamespace: namespace toFolders: folders];
{
[self _appendNamespace: namespace toFolders: folders];
ASSIGN(sharedFoldersName, [folders lastObject]);
}
}
- (NSArray *) _namespacesWithKey: (NSString *) nsKey
@@ -788,6 +808,16 @@ static NSString *sieveScriptName = @"sogo";
return [self _userFolderNameWithPurpose: @"Trash"];
}
- (NSString *) otherUsersFolderNameInContext: (id)_ctx
{
return otherUsersFolderName;
}
- (NSString *) sharedFoldersNameInContext: (id)_ctx
{
return sharedFoldersName;
}
- (id) folderWithTraversal: (NSString *) traversal
andClassName: (NSString *) className
{
+1 -1
View File
@@ -1,6 +1,6 @@
/* SOGoUserSettings.m - this file is part of SOGo
*
* Copyright (C) 2009 Inverse inc.
* Copyright (C) 2009-2010 Inverse inc.
*
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
*