diff --git a/ChangeLog b/ChangeLog index a85e153a7..b4c1e0b1e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2007-03-19 Wolfgang Sourdeau + * UI/Scheduler/UIxTaskEditor.m ([UIxTaskEditor + -changeStatusAction]): rewrote method. + * UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor -_handleAttendeesEdition]): make sure "attendeesNames" has a length > 0 before computing the attendees. Otherwise there will be diff --git a/UI/Scheduler/UIxTaskEditor.m b/UI/Scheduler/UIxTaskEditor.m index 2ec564b5a..d4330911a 100644 --- a/UI/Scheduler/UIxTaskEditor.m +++ b/UI/Scheduler/UIxTaskEditor.m @@ -429,16 +429,6 @@ } } -- (id) acceptAction -{ - return [self acceptOrDeclineAction:YES]; -} - -- (id) declineAction -{ - return [self acceptOrDeclineAction:NO]; -} - // TODO: add tentatively - (id) acceptOrDeclineAction: (BOOL) _accept @@ -450,4 +440,40 @@ return self; } +- (id) acceptAction +{ + return [self acceptOrDeclineAction:YES]; +} + +- (id) declineAction +{ + return [self acceptOrDeclineAction:NO]; +} + +- (id) changeStatusAction +{ + SOGoTaskObject *clientObject; + NSString *newStatus, *iCalString; + + clientObject = [self clientObject]; + todo = (iCalToDo *) [clientObject component: NO]; + if (todo) + { + newStatus = [self queryParameterForKey: @"status"]; + if ([newStatus intValue]) + [todo setCompleted: [NSCalendarDate date]]; + else + { + [todo setCompleted: nil]; + [todo setPercentComplete: 0]; + [todo setStatus: @"IN-PROCESS"]; + } + + iCalString = [[clientObject calendar: NO] versitString]; + [clientObject saveContentString: iCalString]; + } + + return self; +} + @end