From 67a80e7a8896546f3c95dc21566be6b1815a7244 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 19 Mar 2007 15:37:37 +0000 Subject: [PATCH] Monotone-Parent: 5de6813223eb9a48072c97c7a682bcf2e4ed8d2f Monotone-Revision: 7b063b6baee92602dac99dd40f043d618eb1213d Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-03-19T15:37:37 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 3 +++ UI/Scheduler/UIxTaskEditor.m | 46 ++++++++++++++++++++++++++++-------- 2 files changed, 39 insertions(+), 10 deletions(-) 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