From 54b18ff052639d186bed49d5010c4b553de96e2a Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 18 Aug 2009 16:22:20 +0000 Subject: [PATCH] Monotone-Parent: afa8a9fe095d6de052bd0ce6faa3412737247666 Monotone-Revision: 5e34460d5c6145da6324800a86094d3851ed1333 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2009-08-18T16:22:20 Monotone-Branch: ca.inverse.sogo --- UI/Scheduler/UIxCalListingActions.m | 68 ++++++++++++++--------------- 1 file changed, 33 insertions(+), 35 deletions(-) diff --git a/UI/Scheduler/UIxCalListingActions.m b/UI/Scheduler/UIxCalListingActions.m index 3e06507a6..11582ceac 100644 --- a/UI/Scheduler/UIxCalListingActions.m +++ b/UI/Scheduler/UIxCalListingActions.m @@ -321,44 +321,42 @@ static NSArray *tasksFields = nil; folders = [[clientObject subFolders] objectEnumerator]; while ((currentFolder = [folders nextObject])) { - if (![component isEqualToString: @"vtodo"] || [currentFolder showCalendarTasks]) + if ([currentFolder isActive] + && (![component isEqualToString: @"vtodo"] || [currentFolder showCalendarTasks])) { - if ([currentFolder isActive]) - { - currentInfos - = [[currentFolder fetchCoreInfosFrom: startDate - to: endDate - title: title - component: component] objectEnumerator]; + currentInfos + = [[currentFolder fetchCoreInfosFrom: startDate + to: endDate + title: title + component: component] objectEnumerator]; - while ((newInfo = [currentInfos nextObject])) + while ((newInfo = [currentInfos nextObject])) + { + if ([fields containsObject: @"editable"]) { - if ([fields containsObject: @"editable"]) - { - role = - [currentFolder roleForComponentsWithAccessClass: - [[newInfo objectForKey: @"c_classification"] intValue] - forUser: userLogin]; - if ([role isEqualToString: @"ComponentModifier"] - || [role length] == 0) - [newInfo setObject: [NSNumber numberWithInt: 1] - forKey: @"editable"]; - else - [newInfo setObject: [NSNumber numberWithInt: 0] - forKey: @"editable"]; - } - [newInfo setObject: [currentFolder nameInContainer] - forKey: @"c_folder"]; - [newInfo setObject: [currentFolder ownerInContext: context] - 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]; - [infos addObject: [newInfo objectsForKeys: fields - notFoundMarker: marker]]; + role = + [currentFolder roleForComponentsWithAccessClass: + [[newInfo objectForKey: @"c_classification"] intValue] + forUser: userLogin]; + if ([role isEqualToString: @"ComponentModifier"] + || [role length] == 0) + [newInfo setObject: [NSNumber numberWithInt: 1] + forKey: @"editable"]; + else + [newInfo setObject: [NSNumber numberWithInt: 0] + forKey: @"editable"]; } + [newInfo setObject: [currentFolder nameInContainer] + forKey: @"c_folder"]; + [newInfo setObject: [currentFolder ownerInContext: context] + 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]; + [infos addObject: [newInfo objectsForKeys: fields + notFoundMarker: marker]]; } } } @@ -994,7 +992,7 @@ _computeBlocksPosition (NSArray *blocks) } - while (task = [tasks nextObject]) + while ((task = [tasks nextObject])) { statusCode = [[task objectAtIndex: 2] intValue]; if (statusCode != 1 || showCompleted)