From cc21f32490f54365e1cd7d230c0fba03ebd8e9e3 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Tue, 24 Mar 2009 15:34:15 +0000 Subject: [PATCH] See ChangeLog Monotone-Parent: f88d99a5bcea75c289e4a86001d1d294d3dadb9e Monotone-Revision: 3dc6b0849523db031cf866d058ecccbf1ecb98db Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-03-24T15:34:15 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 17 +++++++++-- SOPE/NGCards/ChangeLog | 5 ++++ .../Appointments/SOGoCalendarComponent.m | 6 +++- UI/MailPartViewers/UIxMailPartICalActions.m | 29 ++++++++++++------- 4 files changed, 43 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index bd1c2c991..8efbadee6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2009-03-24 Francis Lachapelle + + * SoObjects/Appointments/SOGoCalendarComponent.m + ([SOGoCalendarComponent + -sendEMailUsingTemplateNamed:forObject:previousObject:toAttendees:]): + no longer send a deletion notification to an attendee who already + declined the meeting. + + * UI/MailPartViewers/UIxMailPartICalActions.m + ([UIxMailPartICalActions -_eventObjectWithUID:forUser:]): when + looking for an event for a specific user, we now search into all + the user's calendar folders. + 2009-03-24 Wolfgang Sourdeau * SoObjects/SOGo/SOGoUser.m ([SOGoUser @@ -115,8 +128,8 @@ * UI/MainUI/SOGoRootPage.m ([SOGoRootPage -version]): new method that returns the application version. - * iCalDateTime.m ([iCalDateTime -dateTime]): when not defined, the - timezone is now guessed from the date of the current object. + * SOPE/NGCards/iCalDateTime.m ([iCalDateTime -dateTime]): when not + defined, the timezone is now guessed from the date of the current object. 2009-03-18 Ludovic Marcotte diff --git a/SOPE/NGCards/ChangeLog b/SOPE/NGCards/ChangeLog index 09e7074bc..330b308a8 100644 --- a/SOPE/NGCards/ChangeLog +++ b/SOPE/NGCards/ChangeLog @@ -9,6 +9,11 @@ currentStartDate when instantiated from a copy of firDate, to avoid a leak. +2009-03-18 Francis Lachapelle + + * iCalDateTime.m ([iCalDateTime -dateTime]): when not defined, the + timezone is now guessed from the date of the current object. + 2009-02-06 Wolfgang Sourdeau * CardElement.m ([CardElement -setParent:aParent]): no longer diff --git a/SoObjects/Appointments/SOGoCalendarComponent.m b/SoObjects/Appointments/SOGoCalendarComponent.m index 017473402..82cc7899b 100644 --- a/SoObjects/Appointments/SOGoCalendarComponent.m +++ b/SoObjects/Appointments/SOGoCalendarComponent.m @@ -570,7 +570,11 @@ _occurenceHasID (iCalRepeatableEntityObject *occurence, NSString *recID) for (i = 0; i < count; i++) { attendee = [attendees objectAtIndex: i]; - if (![[attendee uid] isEqualToString: owner]) + // Don't send a notification to the event organizer nor a deletion + // notification to an attendee who already declined the invitation. + if (![[attendee uid] isEqualToString: owner] && + !([[attendee partStat] compare: @"DECLINED"] == NSOrderedSame && + [newPageName compare: @"Deletion"] == NSOrderedSame)) { /* construct recipient */ recipient = [attendee mailAddress]; diff --git a/UI/MailPartViewers/UIxMailPartICalActions.m b/UI/MailPartViewers/UIxMailPartICalActions.m index e6e483d6c..70ebc78c9 100644 --- a/UI/MailPartViewers/UIxMailPartICalActions.m +++ b/UI/MailPartViewers/UIxMailPartICalActions.m @@ -21,6 +21,7 @@ */ #import +#import #import #import @@ -41,6 +42,7 @@ #import #import #import +#import #import #import #import @@ -69,27 +71,32 @@ - (SOGoAppointmentObject *) _eventObjectWithUID: (NSString *) uid forUser: (SOGoUser *) user { - SOGoAppointmentFolder *personalFolder; + SOGoAppointmentFolder *folder; SOGoAppointmentObject *eventObject; + NSArray *folders; + NSEnumerator *e; NSString *cname; eventObject = nil; -#warning Should call lookupCalendarFoldersForUIDs to search among all folders - personalFolder = [user personalCalendarFolderInContext: context]; - cname = [personalFolder resourceNameForEventUID: uid]; - if (cname) + folders = [[user calendarsFolderInContext: context] subFolders]; + e = [folders objectEnumerator]; + while ( eventObject == nil && (folder = [e nextObject]) ) { - eventObject = [personalFolder lookupName: cname - inContext: context acquire: NO]; - if (![eventObject isKindOfClass: [SOGoAppointmentObject class]]) - eventObject = nil; + cname = [folder resourceNameForEventUID: uid]; + if (cname) + { + eventObject = [folder lookupName: cname + inContext: context acquire: NO]; + if (![eventObject isKindOfClass: [SOGoAppointmentObject class]]) + eventObject = nil; + } } - + if (!eventObject) { eventObject = [SOGoAppointmentObject objectWithName: uid - inContainer: personalFolder]; + inContainer: folder]; [eventObject setIsNew: YES]; }