From 2d0275e0cf1db11a36c202de355496b4cd6e6dae Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Sun, 18 Mar 2007 19:19:44 +0000 Subject: [PATCH] Monotone-Parent: e1d773b231903817edb0d556fee132ccd592c4a4 Monotone-Revision: 5b2150fb5513e0a65b7a1ee2a646d824071da645 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-03-18T19:19:44 Monotone-Branch: ca.inverse.sogo --- .../Appointments/SOGoCalendarComponent.m | 7 ++++--- UI/Scheduler/GNUmakefile | 3 ++- UI/Scheduler/UIxAppointmentEditor.m | 21 +++++++++++++++++++ UI/Scheduler/UIxTaskEditor.m | 21 +++++++++++++++++++ 4 files changed, 48 insertions(+), 4 deletions(-) diff --git a/SoObjects/Appointments/SOGoCalendarComponent.m b/SoObjects/Appointments/SOGoCalendarComponent.m index 11a3178a1..7c60bae97 100644 --- a/SoObjects/Appointments/SOGoCalendarComponent.m +++ b/SoObjects/Appointments/SOGoCalendarComponent.m @@ -422,12 +422,13 @@ static BOOL sendEMailNotifications = NO; { BOOL isOrganizerOrOwner; iCalRepeatableEntityObject *component; + NSString *organizerEmail; component = [self component: NO]; - if (component) + organizerEmail = [[component organizer] email]; + if (component && [organizerEmail length] > 0) isOrganizerOrOwner - = ([component isOrganizer: email] - || [[container ownerInContext: nil] isEqualToString: login]); + = ([organizerEmail caseInsensitiveCompare: email] == NSOrderedSame); else isOrganizerOrOwner = [[container ownerInContext: nil] isEqualToString: login]; diff --git a/UI/Scheduler/GNUmakefile b/UI/Scheduler/GNUmakefile index 50a6eaa40..eb0a49f60 100644 --- a/UI/Scheduler/GNUmakefile +++ b/UI/Scheduler/GNUmakefile @@ -61,7 +61,8 @@ SchedulerUI_RESOURCE_FILES += \ Toolbars/SOGoAppointmentObjectAccept.toolbar \ Toolbars/SOGoAppointmentObjectDecline.toolbar \ Toolbars/SOGoAppointmentObjectAcceptOrDecline.toolbar \ - Toolbars/SOGoTaskObject.toolbar + Toolbars/SOGoTaskObject.toolbar \ + Toolbars/SOGoComponentClose.toolbar SchedulerUI_LOCALIZED_RESOURCE_FILES += \ Localizable.strings \ diff --git a/UI/Scheduler/UIxAppointmentEditor.m b/UI/Scheduler/UIxAppointmentEditor.m index bf513e947..cbf5af293 100644 --- a/UI/Scheduler/UIxAppointmentEditor.m +++ b/UI/Scheduler/UIxAppointmentEditor.m @@ -363,4 +363,25 @@ [event setTransparency: @"OPAQUE"]; } +- (id) acceptAction +{ + return [self acceptOrDeclineAction:YES]; +} + +- (id) declineAction +{ + return [self acceptOrDeclineAction:NO]; +} + +// TODO: add tentatively + +- (id) acceptOrDeclineAction: (BOOL) _accept +{ + [[self clientObject] changeParticipationStatus: + _accept ? @"ACCEPTED" : @"DECLINED" + inContext: [self context]]; + + return self; +} + @end diff --git a/UI/Scheduler/UIxTaskEditor.m b/UI/Scheduler/UIxTaskEditor.m index b0d352e43..2ec564b5a 100644 --- a/UI/Scheduler/UIxTaskEditor.m +++ b/UI/Scheduler/UIxTaskEditor.m @@ -429,4 +429,25 @@ } } +- (id) acceptAction +{ + return [self acceptOrDeclineAction:YES]; +} + +- (id) declineAction +{ + return [self acceptOrDeclineAction:NO]; +} + +// TODO: add tentatively + +- (id) acceptOrDeclineAction: (BOOL) _accept +{ + [[self clientObject] changeParticipationStatus: + _accept ? @"ACCEPTED" : @"DECLINED" + inContext: [self context]]; + + return self; +} + @end