From 902db62ec846239a8b3b6fb19d3b8453003fdf51 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Thu, 12 Apr 2012 23:40:05 +0000 Subject: [PATCH] Monotone-Parent: 42fb4d40a22288da8859b369ec18915fb6e1164c Monotone-Revision: d62b88251dbc88a5f0e5988172e839b00b7a0f14 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-04-12T23:40:05 --- ChangeLog | 4 ++++ SoObjects/Appointments/SOGoAppointmentFolder.h | 2 ++ SoObjects/Appointments/SOGoAppointmentFolder.m | 13 ++++++++----- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2263afd30..9cbb91fa7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2012-04-12 Wolfgang Sourdeau + * SoObjects/Appointments/SOGoAppointmentFolder.m + (-davCalendarComponentSet): componentSet is now an ivar. Include + VTODO only with showCalendarTasks returns YES. + * UI/Scheduler/UIxCalListingActions.m (_fetchFields:forComponentOfType:): do not check for "showCalendarTasks" since it is now handled at the diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.h b/SoObjects/Appointments/SOGoAppointmentFolder.h index 73ba92330..bc5f10f2c 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.h +++ b/SoObjects/Appointments/SOGoAppointmentFolder.h @@ -49,6 +49,7 @@ @class NSTimeZone; @class GCSFolder; @class iCalCalendar; +@class SOGoWebDAVValue; typedef enum { SOGoAppointmentProxyPermissionNone = 0, @@ -66,6 +67,7 @@ typedef enum { int davTimeLimitSeconds; int davTimeHalfLimitSeconds; BOOL userCanAccessObjectsClassifiedAs[iCalAccessClassCount]; + SOGoWebDAVValue *componentSet; } - (BOOL) isActive; diff --git a/SoObjects/Appointments/SOGoAppointmentFolder.m b/SoObjects/Appointments/SOGoAppointmentFolder.m index 2fade58f7..e2833640a 100644 --- a/SoObjects/Appointments/SOGoAppointmentFolder.m +++ b/SoObjects/Appointments/SOGoAppointmentFolder.m @@ -263,6 +263,7 @@ static NSNumber *sharedYes = nil; /* 86400 / 2 = 43200. We hardcode that value in order to avoid integer and float confusion. */ davTimeHalfLimitSeconds = davCalendarStartTimeLimit * 43200; + componentSet = nil; } return self; @@ -273,6 +274,7 @@ static NSNumber *sharedYes = nil; [aclMatrix release]; [stripFields release]; [uidToFilename release]; + [componentSet release]; [super dealloc]; } @@ -2037,27 +2039,28 @@ firstInstanceCalendarDateRange: (NGCalendarDateRange *) fir - (SOGoWebDAVValue *) davCalendarComponentSet { - static SOGoWebDAVValue *componentSet = nil; NSMutableArray *components; if (!componentSet) { - components = [NSMutableArray array]; + components = [[NSMutableArray alloc] initWithCapacity: 2]; /* Totally hackish.... we use the "n1" prefix because we know our extensions will assign that one to ..:caldav but we really need to handle element attributes */ [components addObject: [SOGoWebDAVValue valueForObject: @"" attributes: nil]]; - [components addObject: [SOGoWebDAVValue - valueForObject: @"" - attributes: nil]]; + if ([self showCalendarTasks]) + [components addObject: [SOGoWebDAVValue + valueForObject: @"" + attributes: nil]]; componentSet = [davElementWithContent (@"supported-calendar-component-set", XMLNS_CALDAV, components) asWebDAVValue]; [componentSet retain]; + [components release]; } return componentSet;