Monotone-Parent: c30c440a14fe8daee4210904dd0d7212fd743325
Monotone-Revision: a6cd236d62a4ba9246dc67535656fddd4588d4ab Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2008-11-24T13:58:04 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
c2ace24b44
commit
5967911656
|
@ -28,6 +28,7 @@
|
|||
#import <Foundation/NSTimeZone.h>
|
||||
|
||||
#import <NGCards/iCalCalendar.h>
|
||||
#import <NGCards/iCalDateTime.h>
|
||||
#import <NGCards/iCalPerson.h>
|
||||
|
||||
#import <NGObjWeb/WOApplication.h>
|
||||
|
@ -143,12 +144,33 @@ _computeAllDayOffset()
|
|||
- (id) itipEntryWithMethod: (NSString *) method
|
||||
{
|
||||
iCalCalendar *newCalendar;
|
||||
iCalEntityObject *newEntry;
|
||||
iCalEntityObject *currentEvent, *newEntry;
|
||||
iCalPerson *organizer;
|
||||
|
||||
NSArray *events;
|
||||
int i, count;
|
||||
|
||||
newCalendar = [parent mutableCopy];
|
||||
[newCalendar autorelease];
|
||||
[newCalendar setMethod: method];
|
||||
newEntry = (iCalEntityObject *) [newCalendar firstChildWithTag: tag];
|
||||
|
||||
events = [newCalendar childrenWithTag: tag];
|
||||
count = [events count];
|
||||
if (count > 1)
|
||||
{
|
||||
// If the event is recurrent, remove all occurences
|
||||
organizer = [[(iCalEntityObject *)[newCalendar firstChildWithTag: tag] organizer] mutableCopy];
|
||||
for (i = 0; i < count; i++)
|
||||
{
|
||||
currentEvent = [events objectAtIndex: i];
|
||||
[[newCalendar children] removeObject: currentEvent];
|
||||
}
|
||||
newEntry = [[self mutableCopy] autorelease];
|
||||
[newEntry setOrganizer: organizer];
|
||||
[newCalendar addChild: newEntry];
|
||||
}
|
||||
else
|
||||
newEntry = (iCalEntityObject *) [newCalendar firstChildWithTag: tag];
|
||||
|
||||
return newEntry;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue