Monotone-Parent: 8491f20b4bac3508e0839201c1e6756c5df21835
Monotone-Revision: 52de90085e2d18ded0d0c315e7148e1c72feb785 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-07-17T21:04:32 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
4a9c837741
commit
e1beed1ba0
|
@ -49,7 +49,7 @@
|
|||
- (void) addChild: (CardElement *) aChild;
|
||||
- (void) addChildren: (NSArray *) someChildren;
|
||||
|
||||
- (NSArray *) children;
|
||||
- (NSMutableArray *) children;
|
||||
- (CardElement *) firstChildWithTag: (NSString *) aTag;
|
||||
- (NSArray *) childrenWithTag: (NSString *) aTag;
|
||||
- (NSArray *) childrenWithAttribute: (NSString *) anAttribute
|
||||
|
|
|
@ -260,7 +260,7 @@ static NGCardsSaxHandler *sax = nil;
|
|||
[self addChild: currentChild];
|
||||
}
|
||||
|
||||
- (NSArray *) children
|
||||
- (NSMutableArray *) children
|
||||
{
|
||||
return children;
|
||||
}
|
||||
|
@ -398,9 +398,20 @@ static NGCardsSaxHandler *sax = nil;
|
|||
- (id) copyWithZone: (NSZone *) aZone
|
||||
{
|
||||
CardGroup *new;
|
||||
CardElement *newChild;
|
||||
NSMutableArray *newChildren;
|
||||
unsigned int count, max;
|
||||
|
||||
new = [super copyWithZone: aZone];
|
||||
[new setChildrenAsCopy: [children copyWithZone: aZone]];
|
||||
newChildren = [NSMutableArray new];
|
||||
max = [children count];
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
newChild = [[children objectAtIndex: count] copyWithZone: aZone];
|
||||
[newChildren addObject: newChild];
|
||||
}
|
||||
[new setChildrenAsCopy: newChildren];
|
||||
[newChildren release];
|
||||
|
||||
return new;
|
||||
}
|
||||
|
@ -410,9 +421,21 @@ static NGCardsSaxHandler *sax = nil;
|
|||
- (id) mutableCopyWithZone: (NSZone *) aZone
|
||||
{
|
||||
CardGroup *new;
|
||||
CardElement *newChild;
|
||||
NSMutableArray *newChildren;
|
||||
unsigned int count, max;
|
||||
|
||||
new = [super mutableCopyWithZone: aZone];
|
||||
[new setChildrenAsCopy: [children mutableCopyWithZone: aZone]];
|
||||
newChildren = [NSMutableArray new];
|
||||
max = [children count];
|
||||
for (count = 0; count < max; count++)
|
||||
{
|
||||
newChild
|
||||
= [[children objectAtIndex: count] mutableCopyWithZone: aZone];
|
||||
[newChildren addObject: newChild];
|
||||
}
|
||||
[new setChildrenAsCopy: newChildren];
|
||||
[newChildren release];
|
||||
|
||||
return new;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,17 @@
|
|||
2008-07-17 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* iCalRepeatableEntityObject.m ([iCalRepeatableEntityObject
|
||||
-addToExceptionDates:_rdate]): the iCalDateTime argument was
|
||||
replaced with NSCalendarDate.
|
||||
|
||||
* iCalEntityObject.m ([iCalEntityObject
|
||||
-setOrganizer:_organizer]): now accepts a nil argument.
|
||||
|
||||
* CardGroup.m ([CardGroup -children]): now returns an NSMutableArray.
|
||||
([CardGroup -copyWithZone:aZone])
|
||||
([CardGroup -mutableCopyWithZone:aZone]): the children were not
|
||||
properlty cloned, we thus clone them explicitly.
|
||||
|
||||
2008-07-16 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* iCalDateTime.m ([iCalDateTime -setDate:dateTime]): don't set
|
||||
|
|
|
@ -276,10 +276,15 @@
|
|||
}
|
||||
|
||||
- (void) setOrganizer: (iCalPerson *) _organizer
|
||||
{
|
||||
if (_organizer)
|
||||
{
|
||||
[_organizer setTag: @"organizer"];
|
||||
[self setUniqueChild: _organizer];
|
||||
}
|
||||
else
|
||||
[children removeObjectsInArray: [self childrenWithTag: @"organizer"]];
|
||||
}
|
||||
|
||||
- (iCalPerson *) organizer
|
||||
{
|
||||
|
|
|
@ -188,16 +188,18 @@ static Class yearlyCalcClass = Nil;
|
|||
NSEnumerator *dates;
|
||||
NSCalendarDate *currentDate;
|
||||
NGCalendarDateRange *currentRange;
|
||||
int count, maxRanges;
|
||||
unsigned int count, maxRanges;
|
||||
|
||||
maxRanges = [ranges count];
|
||||
dates = [[self _dates: exdates withinRange: limits] objectEnumerator];
|
||||
while ((currentDate = [dates nextObject]))
|
||||
for (count = (maxRanges - 1); count > -1; count--)
|
||||
{
|
||||
currentRange = [ranges objectAtIndex: count];
|
||||
maxRanges = [ranges count];
|
||||
for (count = maxRanges; count > 0; count--)
|
||||
{
|
||||
currentRange = [ranges objectAtIndex: count - 1];
|
||||
if ([currentRange containsDate: currentDate])
|
||||
[ranges removeObjectAtIndex: count];
|
||||
[ranges removeObjectAtIndex: count - 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
are VEVENT, VTODO and VJOURNAL.
|
||||
*/
|
||||
|
||||
@class NSMutableArray, NGCalendarDateRange;
|
||||
@class NSCalendarDate, NSMutableArray, NGCalendarDateRange;
|
||||
|
||||
@interface iCalRepeatableEntityObject : iCalEntityObject
|
||||
// {
|
||||
|
@ -53,7 +53,7 @@
|
|||
- (NSArray *)exceptionRules;
|
||||
|
||||
- (void)removeAllExceptionDates;
|
||||
- (void)addToExceptionDates:(id)_date;
|
||||
- (void)addToExceptionDates:(NSCalendarDate *)_date;
|
||||
- (BOOL)hasExceptionDates;
|
||||
- (NSArray *)exceptionDates;
|
||||
|
||||
|
|
|
@ -107,9 +107,15 @@
|
|||
[children removeObjectsInArray: [self childrenWithTag: @"exdate"]];
|
||||
}
|
||||
|
||||
- (void) addToExceptionDates: (id) _rdate
|
||||
- (void) addToExceptionDates: (NSCalendarDate *) _rdate
|
||||
{
|
||||
[self addChild: _rdate];
|
||||
iCalDateTime *dateTime;
|
||||
|
||||
dateTime = [iCalDateTime new];
|
||||
[dateTime setTag: @"exdate"];
|
||||
[dateTime setDateTime: _rdate];
|
||||
[self addChild: dateTime];
|
||||
[dateTime release];
|
||||
}
|
||||
|
||||
- (void) setExceptionDates: (NSArray *) _rdates
|
||||
|
|
Loading…
Reference in New Issue