Monotone-Parent: 78d012bb528bcbf5295b1d5241415fcb6465a307

Monotone-Revision: b521f340498a0489a0b9c81b91374570890a80fa

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-05-03T16:13:51
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-05-03 16:13:51 +00:00
parent 2c53331f0b
commit e307ee23d2
3 changed files with 53 additions and 0 deletions
+38
View File
@@ -843,4 +843,42 @@
[component setLastModified: now];
}
- (NSString *) toolbar
{
SOGoUser *currentUser;
SOGoCalendarComponent *clientObject;
NSString *toolbarFilename;
iCalPerson *person;
iCalPersonPartStat participationStatus;
clientObject = [self clientObject];
currentUser = [[self context] activeUser];
if ([clientObject isOrganizerOrOwner: currentUser])
{
if ([[clientObject componentTag] isEqualToString: @"vevent"])
toolbarFilename = @"SOGoAppointmentObject.toolbar";
else
toolbarFilename = @"SOGoTaskObject.toolbar";
}
else
{
/* Lightning does not manage participation status within tasks */
person = [clientObject participant: currentUser];
if (person)
{
participationStatus = [person participationStatus];
if (participationStatus == iCalPersonPartStatAccepted)
toolbarFilename = @"SOGoAppointmentObjectDecline.toolbar";
else if (participationStatus == iCalPersonPartStatDeclined)
toolbarFilename = @"SOGoAppointmentObjectAccept.toolbar";
else
toolbarFilename = @"SOGoAppointmentObjectAcceptOrDecline.toolbar";
}
else
toolbarFilename = @"SOGoComponentClose.toolbar";
}
return toolbarFilename;
}
@end