Monotone-Parent: 4aa70b487f0aac9a825415cb0573df63c95632b1

Monotone-Revision: 262094fb69b2e0eb9af1fde64d15aafc31ecccda

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-09-17T03:42:16
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-09-17 03:42:16 +00:00
parent 5ae0cbdfbe
commit e8c2a933c4
3 changed files with 40 additions and 0 deletions
+10
View File
@@ -1,5 +1,15 @@
2007-09-16 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Contacts/SOGoContactGCSFolder.m ([SOGoContactGCSFolder
-compare:otherFolder]): new overriden method that compares two
contact foldes based on their class and then transfer the control
to the super method in SOGoFolder.
* SoObjects/Contacts/SOGoContactLDAPFolder.m
([SOGoContactLDAPFolder -compare:otherFolder]): new method that
compare two contact folders based on their class and then their
display name.
* SoObjects/SOGo/SOGoFolder.m ([SOGoFolder -compare:otherFolder]):
new method for sorting folders. The folders are compared based on
their ownership, whether they are a main folder and finally
+14
View File
@@ -251,6 +251,20 @@
// return r;
// }
/* sorting */
- (NSComparisonResult) compare: (id) otherFolder
{
NSComparisonResult comparison;
if ([NSStringFromClass([otherFolder class])
isEqualToString: @"SOGoContactLDAPFolder"])
comparison = NSOrderedAscending;
else
comparison = [super compare: otherFolder];
return comparison;
}
/* folder type */
- (NSString *) folderType
@@ -256,6 +256,22 @@
return YES;
}
/* sorting */
- (NSComparisonResult) compare: (id) otherFolder
{
NSComparisonResult comparison;
if ([NSStringFromClass([otherFolder class])
isEqualToString: @"SOGoContactGCSFolder"])
comparison = NSOrderedDescending;
else
comparison
= [[self displayName]
localizedCaseInsensitiveCompare: [otherFolder displayName]];
return comparison;
}
/* acls */
- (NSString *) ownerInContext: (WOContext *) noContext
{