Monotone-Parent: 20e1476abe6ae755adf53129d9f3cc9837e0382b

Monotone-Revision: 5cbb667edb91ebb091b9b4498dcc5745ca8afa1d

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-06-13T20:58:57
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-06-13 20:58:57 +00:00
parent 4461aeeeb0
commit 49ce46f3ea
2 changed files with 18 additions and 1 deletions
+5
View File
@@ -1,5 +1,10 @@
2007-06-13 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Scheduler/NSArray+Scheduler.m ([NSArray
-compareEventsAscending:otherEvent]): no longer use compare: on
the time objects since one of them could be an NSNull, which
crashes when comparing with anything.
* UI/Scheduler/UIxCalListingActions.m ([UIxCalListingActions
-eventsListAction]): sort events from here.
([UIxCalListingActions -tasksListAction]): sort tasks from here.
+13 -1
View File
@@ -49,7 +49,19 @@
- (NSComparisonResult) compareEventsAscending: (NSArray *) otherEvent
{
return [[self objectAtIndex: 4] compare: [otherEvent objectAtIndex: 4]];
NSComparisonResult result;
unsigned int selfTime, otherTime;
selfTime = [[self objectAtIndex: 4] intValue];
otherTime = [[otherEvent objectAtIndex: 4] intValue];
if (selfTime > otherTime)
result = NSOrderedDescending;
else if (selfTime < otherTime)
result = NSOrderedAscending;
else
result = NSOrderedSame;
return result;
}
- (NSComparisonResult) compareTasksAscending: (NSArray *) otherTask