From 57765e6911a1ed79d4eb9b34a85550de9c7eee5f Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 24 Nov 2008 21:26:36 +0000 Subject: [PATCH] Monotone-Parent: 4693003507fe98c458c21286d91ac2a4d897dbe9 Monotone-Revision: 2ff14c56a17684b19765d7bcced2675ab78095b7 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-11-24T21:26:36 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 8 ++++++++ SoObjects/SOGo/SOGoParentFolder.m | 22 ++++++++++++++-------- 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3e6710a79..b5d16ea76 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-11-24 Wolfgang Sourdeau + + * SoObjects/SOGo/SOGoParentFolder.m ([SOGoParentFolder + -toManyRelationshipKeys]): return the subfolders in the order by + which they appear in the web interface, to avoid confusing + Lighting with its Inbox management and so that the folders appear + in an ordered way. + 2008-11-23 Wolfgang Sourdeau * UI/MainUI/SOGoUserHomePage.m ([SOGoUserHomePage diff --git a/SoObjects/SOGo/SOGoParentFolder.m b/SoObjects/SOGo/SOGoParentFolder.m index b3cb6bc69..c760701eb 100644 --- a/SoObjects/SOGo/SOGoParentFolder.m +++ b/SoObjects/SOGo/SOGoParentFolder.m @@ -349,14 +349,6 @@ static SoSecurityManager *sm = nil; return obj; } -- (NSArray *) toManyRelationshipKeys -{ - if (!subFolders) - [self initSubFolders]; - - return [subFolders allKeys]; -} - - (NSArray *) subFolders { if (!subFolders) @@ -366,6 +358,20 @@ static SoSecurityManager *sm = nil; sortedArrayUsingSelector: @selector (compare:)]; } +- (NSArray *) toManyRelationshipKeys +{ + NSEnumerator *sortedSubFolders; + NSMutableArray *keys; + SOGoGCSFolder *currentFolder; + + keys = [NSMutableArray array]; + sortedSubFolders = [[self subFolders] objectEnumerator]; + while ((currentFolder = [sortedSubFolders nextObject])) + [keys addObject: [currentFolder nameInContainer]]; + + return keys; +} + - (NSException *) davCreateCollection: (NSString *) pathInfo inContext: (WOContext *) localContext {