From c1040b2216e44c98b74a5519607c7bb2b8a68a2c Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 17 Dec 2007 21:03:21 +0000 Subject: [PATCH] Monotone-Parent: 0e4fe01f65e6836cefb46fca4a1cc35a759e63c2 Monotone-Revision: 348d7cfde7b84e4f271c58cd0b418303e0e045d1 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-12-17T21:03:21 Monotone-Branch: ca.inverse.sogo --- UI/Scheduler/UIxCalListingActions.m | 46 +++++++++++++++-------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/UI/Scheduler/UIxCalListingActions.m b/UI/Scheduler/UIxCalListingActions.m index 04e3355d3..2d0056870 100644 --- a/UI/Scheduler/UIxCalListingActions.m +++ b/UI/Scheduler/UIxCalListingActions.m @@ -349,33 +349,35 @@ participants = nil; state = nil; if ([[oldEvent objectAtIndex: 9] length] > 0 && - [[oldEvent objectAtIndex: 10] length] > 0) { - participants = [[oldEvent objectAtIndex: 9] componentsSeparatedByString: @"\n"]; - states = [[oldEvent objectAtIndex: 10] componentsSeparatedByString: @"\n"]; - for (i = 0; i < [participants count]; i++) { - user = [SOGoUser userWithLogin: [oldEvent objectAtIndex: 11] roles: nil]; - participant = [participants objectAtIndex: i]; - if ([user hasEmail: participant]) { - switch ([[states objectAtIndex: i] intValue]) { - case iCalPersonPartStatNeedsAction: - state = @"needs-action"; - break; - case iCalPersonPartStatAccepted: - state = @"accepted"; - break; - case iCalPersonPartStatDeclined: - state = @"declined"; - break; + [[oldEvent objectAtIndex: 10] length] > 0) + { + participants = [[oldEvent objectAtIndex: 9] componentsSeparatedByString: @"\n"]; + states = [[oldEvent objectAtIndex: 10] componentsSeparatedByString: @"\n"]; + for (i = 0; i < [participants count]; i++) + { + user = [SOGoUser userWithLogin: [oldEvent objectAtIndex: 11] roles: nil]; + participant = [participants objectAtIndex: i]; + if ([user hasEmail: participant]) { + switch ([[states objectAtIndex: i] intValue]) { + case iCalPersonPartStatNeedsAction: + state = @"needs-action"; + break; + case iCalPersonPartStatAccepted: + state = @"accepted"; + break; + case iCalPersonPartStatDeclined: + state = @"declined"; + break; + } + [newEvent replaceObjectAtIndex: 9 withObject: state]; + break; + } } - [newEvent replaceObjectAtIndex: 9 withObject: state]; - break; - } } - } if (participants == nil || i == [participants count]) [newEvent replaceObjectAtIndex: 9 withObject: @""]; - [newEvent removeObjectAtIndex: 10]; [newEvent removeObjectAtIndex: 11]; + [newEvent removeObjectAtIndex: 10]; [newEvents addObject: newEvent];