mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-12 23:15:26 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user