merge of '2f66db18c248ef4670f83c5c56b70ab703fede49'

and '8fb65e4ddd95ab6be36dc4834118f0f4c9e565bc'

Monotone-Parent: 2f66db18c248ef4670f83c5c56b70ab703fede49
Monotone-Parent: 8fb65e4ddd95ab6be36dc4834118f0f4c9e565bc
Monotone-Revision: 7913b29a66901336702f8f33f2d6c0c1342dd655

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2011-04-26T15:04:11
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2011-04-26 15:04:11 +00:00

View File

@@ -95,8 +95,10 @@
ASSIGN(draftsFolderName, [specialFolders objectAtIndex: 1]);
ASSIGN(sentFolderName, [specialFolders objectAtIndex: 2]);
ASSIGN(trashFolderName, [specialFolders objectAtIndex: 3]);
ASSIGN(otherUsersFolderName, [specialFolders objectAtIndex: 4]);
ASSIGN(sharedFoldersName, [specialFolders objectAtIndex: 5]);
if ([specialFolders count] == 5)
ASSIGN(otherUsersFolderName, [specialFolders objectAtIndex: 4]);
if ([specialFolders count] == 6)
ASSIGN(sharedFoldersName, [specialFolders objectAtIndex: 5]);
}
if ([folderName isEqualToString: inboxFolderName])
@@ -129,7 +131,7 @@
// We translate the "Other Users" and "Shared Folders" namespaces.
// While we're at it, we also translate the user's mailbox names
// to the full name of the person.
if ([currentFolder hasPrefix: otherUsersFolderName])
if (otherUsersFolderName && [currentFolder hasPrefix: otherUsersFolderName])
{
// We have a string like /Other Users/lmarcotte/...
pathComponents = [NSMutableArray arrayWithArray: [currentFolder pathComponents]];
@@ -144,7 +146,7 @@
[pathComponents componentsJoinedByString: @"/"]];
}
else if ([currentFolder hasPrefix: sharedFoldersName])
else if (sharedFoldersName && [currentFolder hasPrefix: sharedFoldersName])
currentDisplayName = [NSString stringWithFormat: @"/%@%@", [self labelForKey: @"SharedFoldersName"],
[currentFolder substringFromIndex: [sharedFoldersName length]]];
else