From 5afdcba3976f1340f487ce030ed589bccbc7e75e Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 12 Jun 2007 15:36:10 +0000 Subject: [PATCH] Monotone-Parent: 3a3e7e985adac6637eacd797235cdf6c4eae70cb Monotone-Revision: c0313f0b5f2d308876016aebbaf81c198b684173 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-06-12T15:36:10 Monotone-Branch: ca.inverse.sogo --- UI/Scheduler/UIxCalMulticolumnDayView.h | 8 +- UI/Scheduler/UIxCalMulticolumnDayView.m | 123 ++++++++++++------------ 2 files changed, 64 insertions(+), 67 deletions(-) diff --git a/UI/Scheduler/UIxCalMulticolumnDayView.h b/UI/Scheduler/UIxCalMulticolumnDayView.h index 2b915a56e..656ff4234 100644 --- a/UI/Scheduler/UIxCalMulticolumnDayView.h +++ b/UI/Scheduler/UIxCalMulticolumnDayView.h @@ -31,10 +31,10 @@ NSString *currentTableHour; NSMutableArray *subscriptionUsers; NSMutableArray *hoursToDisplay; - NSArray *allAppointments; +// NSArray *allAppointments; NSString *currentTableUser; - NSDictionary *currentAppointment; +// NSDictionary *currentAppointment; NSString *cssClass; NSString *cssId; @@ -50,8 +50,8 @@ - (void) setCurrentTableUser: (NSString *) aTableDay; - (NSString *) currentTableUser; -- (void) setCurrentAppointment: (NSDictionary *) newCurrentAppointment; -- (NSDictionary *) currentAppointment; +// - (void) setCurrentAppointment: (NSDictionary *) newCurrentAppointment; +// - (NSDictionary *) currentAppointment; @end diff --git a/UI/Scheduler/UIxCalMulticolumnDayView.m b/UI/Scheduler/UIxCalMulticolumnDayView.m index 975d1c2d0..cabe13f87 100644 --- a/UI/Scheduler/UIxCalMulticolumnDayView.m +++ b/UI/Scheduler/UIxCalMulticolumnDayView.m @@ -38,13 +38,13 @@ { if ((self = [super init])) { - allAppointments = nil; +// allAppointments = nil; subscriptionUsers = nil; hoursToDisplay = nil; currentTableUser = nil; currentTableHour = nil; - dateFormatter = [[SOGoDateFormatter alloc] - initWithLocale: [self locale]]; +// dateFormatter = [[SOGoDateFormatter alloc] +// initWithLocale: [self locale]]; } return self; @@ -52,13 +52,10 @@ - (void) dealloc { - if (allAppointments) - [allAppointments release]; - if (subscriptionUsers) - [subscriptionUsers release]; - if (hoursToDisplay) - [hoursToDisplay release]; - [dateFormatter release]; +// [allAppointments release]; + [subscriptionUsers release]; + [hoursToDisplay release]; +// [dateFormatter release]; [super dealloc]; } @@ -189,69 +186,69 @@ /* fetching */ -- (NSCalendarDate *) startDate -{ - return [[self selectedDate] beginOfDay]; -} +// - (NSCalendarDate *) startDate +// { +// return [[self selectedDate] beginOfDay]; +// } -- (NSCalendarDate *) endDate -{ - return [[self selectedDate] endOfDay]; -} +// - (NSCalendarDate *) endDate +// { +// return [[self selectedDate] endOfDay]; +// } -- (NSArray *) appointmentsForCurrentUser -{ - NSMutableArray *filteredAppointments; - NSEnumerator *aptsEnumerator; - NSDictionary *userAppointment; - NSCalendarDate *start, *end; - int endHour; +// - (NSArray *) appointmentsForCurrentUser +// { +// NSMutableArray *filteredAppointments; +// NSEnumerator *aptsEnumerator; +// NSDictionary *userAppointment; +// NSCalendarDate *start, *end; +// int endHour; - if (!allAppointments) - { - allAppointments = [self fetchCoreAppointmentsInfos]; - [allAppointments retain]; - } +// if (!allAppointments) +// { +// allAppointments = [self fetchCoreAppointmentsInfos]; +// [allAppointments retain]; +// } - start = [[self selectedDate] hour: [self dayStartHour] minute: 0]; - endHour = [self dayEndHour]; - if (endHour < 24) - end = [[self selectedDate] hour: [self dayEndHour] minute: 59]; - else - end = [[[self selectedDate] tomorrow] hour: 0 minute: 0]; +// start = [[self selectedDate] hour: [self dayStartHour] minute: 0]; +// endHour = [self dayEndHour]; +// if (endHour < 24) +// end = [[self selectedDate] hour: [self dayEndHour] minute: 59]; +// else +// end = [[[self selectedDate] tomorrow] hour: 0 minute: 0]; - filteredAppointments = [NSMutableArray new]; - [filteredAppointments autorelease]; +// filteredAppointments = [NSMutableArray new]; +// [filteredAppointments autorelease]; - aptsEnumerator = [allAppointments objectEnumerator]; - userAppointment = [aptsEnumerator nextObject]; - while (userAppointment) - { - if ([[userAppointment objectForKey: @"owner"] - isEqualToString: currentTableUser]) - [filteredAppointments - addObject: [self _adjustedAppointment: userAppointment - forStart: start andEnd: end]]; - userAppointment = [aptsEnumerator nextObject]; - } +// aptsEnumerator = [allAppointments objectEnumerator]; +// userAppointment = [aptsEnumerator nextObject]; +// while (userAppointment) +// { +// if ([[userAppointment objectForKey: @"owner"] +// isEqualToString: currentTableUser]) +// [filteredAppointments +// addObject: [self _adjustedAppointment: userAppointment +// forStart: start andEnd: end]]; +// userAppointment = [aptsEnumerator nextObject]; +// } - return filteredAppointments; -} +// return filteredAppointments; +// } -- (void) setCurrentAppointment: (NSDictionary *) newCurrentAppointment -{ - currentAppointment = newCurrentAppointment; -} +// - (void) setCurrentAppointment: (NSDictionary *) newCurrentAppointment +// { +// currentAppointment = newCurrentAppointment; +// } -- (NSDictionary *) currentAppointment -{ - return currentAppointment; -} +// - (NSDictionary *) currentAppointment +// { +// return currentAppointment; +// } -- (NSString *) appointmentsClasses -{ - return @"appointments appointmentsFor1Days"; -} +// - (NSString *) appointmentsClasses +// { +// return @"appointments appointmentsFor1Days"; +// } - (NSString *) currentUserClasses {