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