Monotone-Parent: cd3467d9325955f5de25492e730817938dea9c3c

Monotone-Revision: 76da8aec6316337cc5bf03ff7940ad6b6e408b2f

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2006-11-07T19:34:30
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2006-11-07 19:34:30 +00:00
parent e3be0dd8d2
commit 50b2ececb6
2 changed files with 26 additions and 14 deletions

View File

@@ -3,6 +3,10 @@
* UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor
-newStartDate]): new method to determine the start date depending
on the URL parameters, the current day and the current time.
([UIxComponentEditor -toolbar]): new method to determine the
filename of the toolbar that should be drawn depending on the
ownership and the list of attendees of the task/event wrt to the
current user...
* UI/Scheduler/UIxTimeDateControl.m ([UIxTimeDateControl
-setDayStartHour:aStartHour]): adjust the minutes to the next

View File

@@ -811,26 +811,34 @@
- (NSString *) _toolbarForCalObject: (iCalEntityObject *) calObject
{
NSString *filename, *myEmail;
iCalPerson *person;
NSEnumerator *persons;
iCalPersonPartStat myParticipationStatus;
BOOL found;
myEmail = [[[self context] activeUser] email];
if ([self canEditComponent])
if ([[organizer rfc822Email] isEqualToString: myEmail])
filename = @"SOGoAppointmentObject.toolbar";
else
{
if ([calObject isParticipant: myEmail])
{
myParticipationStatus
= [[calObject findParticipantWithEmail: myEmail] participationStatus];
if (myParticipationStatus == iCalPersonPartStatAccepted)
filename = @"SOGoAppointmentObjectDecline.toolbar";
else if (myParticipationStatus == iCalPersonPartStatDeclined)
filename = @"SOGoAppointmentObjectAccept.toolbar";
else
filename = @"SOGoAppointmentObjectAcceptOrDecline.toolbar";
}
else
filename = @"";
filename = @"";
found = NO;
persons = [participants objectEnumerator];
person = [persons nextObject];
while (person && !found)
if ([[person rfc822Email] isEqualToString: myEmail])
{
found = YES;
myParticipationStatus = [person participationStatus];
if (myParticipationStatus == iCalPersonPartStatAccepted)
filename = @"SOGoAppointmentObjectDecline.toolbar";
else if (myParticipationStatus == iCalPersonPartStatDeclined)
filename = @"SOGoAppointmentObjectAccept.toolbar";
else
filename = @"SOGoAppointmentObjectAcceptOrDecline.toolbar";
}
else
person = [persons nextObject];
}
return filename;