From f80d1ab5fa52c729013d267ef9f17154e01165b5 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 22 Mar 2010 17:49:23 +0000 Subject: [PATCH] Monotone-Parent: 54efe8046f7359444a19149b1c5e4ed19262c14e Monotone-Revision: d9b64f2f2d300ee374dbaa78a98f62ce367f4588 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-03-22T17:49:23 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 4 ++++ UI/Scheduler/UIxCalListingActions.m | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2c14b1ac4..23d235714 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2010-03-22 Wolfgang Sourdeau + * UI/Scheduler/UIxCalListingActions.m + (_fetchFields:forComponentOfType:): fix dates only in day-based + views or for all-day events. + * Tests/Unit/TestiCalTimeZonePeriod.m: new test module for iCalTimeZonePeriod. Added full test method for _occurenceForDate:byRRule:. diff --git a/UI/Scheduler/UIxCalListingActions.m b/UI/Scheduler/UIxCalListingActions.m index 6d79992ac..39cf13a38 100644 --- a/UI/Scheduler/UIxCalListingActions.m +++ b/UI/Scheduler/UIxCalListingActions.m @@ -261,6 +261,7 @@ static NSArray *tasksFields = nil; forKey: @"c_title"]; } +/* TODO: shouldn't this be handled when creating the quick records ? */ - (void) _fixDates: (NSMutableDictionary *) aRecord { NSCalendarDate *aDate, *aStartDate; @@ -337,6 +338,7 @@ static NSArray *tasksFields = nil; component: component] objectEnumerator]; owner = [currentFolder ownerInContext: context]; ownerUser = [SOGoUser userWithLogin: owner]; + /* TODO: this should be handled per-folder rather than per-event. */ isErasable = ([owner isEqualToString: userLogin] || [[currentFolder aclsForUser: userLogin] containsObject: SOGoRole_ObjectEraser]); while ((newInfo = [currentInfos nextObject])) @@ -384,9 +386,11 @@ static NSArray *tasksFields = nil; forKey: @"c_owner"]; if (![[newInfo objectForKey: @"c_title"] length]) [self _fixComponentTitle: newInfo withType: component]; - // Possible improvement: only call _fixDates if event is recurrent - // or the view range span a daylight saving time change - [self _fixDates: newInfo]; + if (dayBasedView + || [[newInfo objectForKey: @"c_isallday"] boolValue]) + // Possible improvement: only call _fixDates if event is recurrent + // or the view range span a daylight saving time change + [self _fixDates: newInfo]; [infos addObject: [newInfo objectsForKeys: fields notFoundMarker: marker]]; }