mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-05 08:34:30 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user