mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-25 08:02:44 +00:00
Monotone-Parent: 1446e7383727bc0d371dfafcec06697f030f7117
Monotone-Revision: 7f4c04f0c1883efb437cd0189f442b20c0063c82 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-02-20T19:47:58 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -43,12 +43,31 @@
|
||||
return nil;
|
||||
}
|
||||
|
||||
+ (NSString *) folderNameSuffix
|
||||
{
|
||||
return @"";
|
||||
}
|
||||
|
||||
+ (NSString *) getFolderDisplayName: (NSString *) sogoDisplayName
|
||||
{
|
||||
NSString *suffix, *displayName;
|
||||
|
||||
suffix = [self folderNameSuffix];
|
||||
if ([suffix length] > 0 && ![sogoDisplayName hasSuffix: suffix])
|
||||
displayName = [NSString stringWithFormat: @"%@ (%@)",
|
||||
sogoDisplayName, suffix];
|
||||
else
|
||||
displayName = sogoDisplayName;
|
||||
|
||||
return displayName;
|
||||
}
|
||||
|
||||
+ (struct mapistore_contexts_list *) listContextsForUser: (NSString *) userName
|
||||
withTDBIndexing: (struct tdb_wrap *) indexingTdb
|
||||
inMemCtx: (TALLOC_CTX *) memCtx
|
||||
{
|
||||
struct mapistore_contexts_list *firstContext = NULL, *context;
|
||||
NSString *moduleName, *baseUrl, *url, *nameInContainer;
|
||||
NSString *moduleName, *baseUrl, *url, *nameInContainer, *displayName;
|
||||
NSArray *subfolders;
|
||||
MAPIStoreUserContext *userContext;
|
||||
SOGoParentFolder *parentFolder;
|
||||
@@ -75,8 +94,8 @@
|
||||
nameInContainer = [currentFolder nameInContainer];
|
||||
url = [NSString stringWithFormat: @"%@%@", baseUrl, nameInContainer];
|
||||
context->url = [url asUnicodeInMemCtx: context];
|
||||
context->name = [[currentFolder displayName]
|
||||
asUnicodeInMemCtx: context];
|
||||
displayName = [self getFolderDisplayName: [currentFolder displayName]];
|
||||
context->name = [displayName asUnicodeInMemCtx: context];
|
||||
context->main_folder = [nameInContainer isEqualToString: @"personal"];
|
||||
context->role = [self MAPIContextRole];
|
||||
context->tag = "tag";
|
||||
|
||||
Reference in New Issue
Block a user