Monotone-Parent: 9644df847f3d64262029a478a7508355366a0d57

Monotone-Revision: 24aa8e2c1d2f2c9fdab5c5ebabfa870aac732d46

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2008-12-05T16:11:54
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle committed 2008-12-05 16:11:54 +00:00
1 parent 30f832a375
commit 5d4d5483ef
2 files changed
+29 -6

No files matched your search

+27 -4
View File
@@ -255,7 +255,21 @@
- (BOOL) isEventStoredInCalendar - (BOOL) isEventStoredInCalendar
{ {
return ([self storedEventObject] != nil); NSCalendarDate *recurrenceId;
NSString *recurrenceTime;
BOOL inCalendar;
recurrenceId = [[self inEvent] recurrenceId];
if (recurrenceId)
{
recurrenceTime = [NSString stringWithFormat: @"%f", [recurrenceId timeIntervalSince1970]];
inCalendar = ([[self storedEventObject] lookupOccurence: recurrenceTime] != nil);
}
else
inCalendar = ([self storedEventObject] != nil);
return inCalendar;
} }
- (iCalEvent *) storedEvent - (iCalEvent *) storedEvent
@@ -272,6 +286,7 @@
{ {
// Find the specific occurence within the repeating vEvent. // Find the specific occurence within the repeating vEvent.
NSString *recurrenceTime; NSString *recurrenceTime;
iCalPerson *organizer;
recurrenceTime = [NSString stringWithFormat: @"%f", [recurrenceId timeIntervalSince1970]]; recurrenceTime = [NSString stringWithFormat: @"%f", [recurrenceId timeIntervalSince1970]];
storedEvent = (iCalEvent*)[[self storedEventObject] lookupOccurence: recurrenceTime]; storedEvent = (iCalEvent*)[[self storedEventObject] lookupOccurence: recurrenceTime];
@@ -279,6 +294,14 @@
if (storedEvent == nil) if (storedEvent == nil)
// If no occurence found, create one // If no occurence found, create one
storedEvent = (iCalEvent*)[storedEventObject newOccurenceWithID: recurrenceTime]; storedEvent = (iCalEvent*)[storedEventObject newOccurenceWithID: recurrenceTime];
// Add organizer to occurence if not present
organizer = [storedEvent organizer];
if (organizer == nil || [organizer isVoid])
{
organizer = [[[storedEvent parent] firstChildWithTag: [storedEventObject componentTag]] organizer];
[storedEvent setOrganizer: organizer];
}
} }
[storedEvent retain]; [storedEvent retain];
@@ -330,10 +353,10 @@
NSString *value; NSString *value;
organizer = [[self authorativeEvent] organizer]; organizer = [[self authorativeEvent] organizer];
if (organizer) if ([organizer isVoid])
value = [self _personForDisplay: organizer];
else
value = @"[todo: no organizer set, use 'from']"; value = @"[todo: no organizer set, use 'from']";
else
value = [self _personForDisplay: organizer];
return value; return value;
} }
@@ -184,7 +184,7 @@
<tr> <tr>
<td valign="top"><var:string label:value="Attendees"/>:</td> <td valign="top"><var:string label:value="Attendees"/>:</td>
<td> <td>
<var:foreach list="inEvent.participants" item="attendee"> <var:foreach list="authorativeEvent.participants" item="attendee">
<a var:href="attendee.email"><var:string value="attendeeForDisplay"/></a> <a var:href="attendee.email"><var:string value="attendeeForDisplay"/></a>
(<var:string label:value="$attendee.partStatWithDefault" />) (<var:string label:value="$attendee.partStatWithDefault" />)
<br /> <br />
@@ -192,7 +192,7 @@
</td> </td>
</tr> </tr>
<var:if condition="inEvent.comment.isNotEmpty"> <var:if condition="authorativeEvent.comment.isNotEmpty">
<tr> <!-- description in iCal --> <tr> <!-- description in iCal -->
<td valign="top"><var:string label:value="Comment"/>:</td> <td valign="top"><var:string label:value="Comment"/>:</td>
<td> <td>