diff --git a/ChangeLog b/ChangeLog index 86dd66f70..6f88afbdb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,12 @@ (-_toolbarForOwner:andClientObject:): no toolbar should appear when dealing with web calendars. +2009-10-14 Ludovic Marcotte + + * UI/Scheduler/UIxCalMainActions.m + We store the string value of the URL in our + prefs, not the NSURL instance. + 2009-10-13 Ludovic Marcotte * SoObjects/SOGo/NSDictionary+BSJSONAdditions.m @@ -41,6 +47,20 @@ 2009-10-13 Wolfgang Sourdeau + * UI/Scheduler/UIxComponentEditor.m (-setComponent:): we invoke + _loadAttendee only when "jsonAttendees" is not set, even though + that condition should always be true. + + * UI/PreferencesUI/UIxPreferences.m (-setCategoriesValue): we use + [self errorWithFormat:] rather than NSLog to output + deserialization errors. + + * UI/Scheduler/UIxAppointmentEditor.m (-delegateAction): same as + below. + + * UI/MailPartViewers/UIxMailPartICalActions.m (-delegateAction): + delegatedAttendee is autoreleased to avoid a leak. + * SoObjects/SOGo/LDAPSource.m (-dealloc): we release the "searchAttributes" ivar, even though LDAPSource instances are never deallocated. diff --git a/UI/MailPartViewers/UIxMailPartICalActions.m b/UI/MailPartViewers/UIxMailPartICalActions.m index 9e7ebe283..1cd8a956e 100644 --- a/UI/MailPartViewers/UIxMailPartICalActions.m +++ b/UI/MailPartViewers/UIxMailPartICalActions.m @@ -264,6 +264,7 @@ { user = [context activeUser]; delegatedAttendee = [iCalPerson new]; + [delegatedAttendee autorelease]; [delegatedAttendee setEmail: delegatedEmail]; delegatedUid = [delegatedAttendee uid]; if (delegatedUid) @@ -272,7 +273,6 @@ delegatedUser = [SOGoUser userWithLogin: delegatedUid]; [delegatedAttendee setCn: [delegatedUser cn]]; } - [delegatedAttendee setRole: @"REQ-PARTICIPANT"]; [delegatedAttendee setRsvp: @"TRUE"]; [delegatedAttendee setParticipationStatus: iCalPersonPartStatNeedsAction]; diff --git a/UI/MainUI/SOGoUserHomePage.m b/UI/MainUI/SOGoUserHomePage.m index 02de6ad66..3d2b8f12a 100644 --- a/UI/MainUI/SOGoUserHomePage.m +++ b/UI/MainUI/SOGoUserHomePage.m @@ -323,7 +323,7 @@ static NSString *LDAPContactInfoAttribute = nil; [response setHeader: @"text/plain; charset=utf-8" forKey: @"Content-Type"]; - responseString = [NSMutableString new]; + responseString = [NSMutableString string]; // We sort our array - this is pretty useful for the Web // interface of SOGo. @@ -353,7 +353,6 @@ static NSString *LDAPContactInfoAttribute = nil; } } [response appendContentString: responseString]; - [responseString release]; return response; } diff --git a/UI/PreferencesUI/UIxPreferences.m b/UI/PreferencesUI/UIxPreferences.m index ff7623125..608407715 100644 --- a/UI/PreferencesUI/UIxPreferences.m +++ b/UI/PreferencesUI/UIxPreferences.m @@ -30,6 +30,8 @@ #import #import +#import + #import #import #import @@ -369,8 +371,7 @@ static BOOL forwardEnabled = NO; NSMutableArray *daysList; unsigned int currentDay; - daysList = [NSMutableArray new]; - [daysList autorelease]; + daysList = [NSMutableArray array]; for (currentDay = 0; currentDay < 7; currentDay++) [daysList addObject: [NSString stringWithFormat: @"%d", currentDay]]; @@ -751,8 +752,7 @@ static BOOL forwardEnabled = NO; addressesList = [vacationOptions objectForKey: @"autoReplyEmailAddresses"]; if (!addressesList) { - newAddressesList = [NSMutableArray new]; - [newAddressesList autorelease]; + newAddressesList = [NSMutableArray array]; addressesList = [NSMutableArray arrayWithArray: [user allEmails]]; for (i = 0; i < [addressesList count]; i++) { @@ -1031,10 +1031,10 @@ static BOOL forwardEnabled = NO; mutabilityOption: NSPropertyListImmutable format: &format errorDescription: &error]; - - if(!plist) + if (!plist) { - NSLog(error); + [self errorWithFormat: @"an error occured during deserialization" + @" of categories: %@", error]; [error release]; } else @@ -1044,7 +1044,6 @@ static BOOL forwardEnabled = NO; [userDefaults setObject: [plist objectAtIndex: 1] forKey: @"CalendarCategoriesColors"]; } - } - (NSArray *) languages diff --git a/UI/SOGoUI/SOGoAptFormatter.m b/UI/SOGoUI/SOGoAptFormatter.m index 3c5c4b54b..dbd49401d 100644 --- a/UI/SOGoUI/SOGoAptFormatter.m +++ b/UI/SOGoUI/SOGoAptFormatter.m @@ -240,8 +240,7 @@ NSCalendarDate *startDate; NSTimeZone *dtz; - title = [NSMutableString new]; - [title autorelease]; + title = [NSMutableString string]; dtz = [self displayTZ]; startDate = [_apt valueForKey: @"startDate"]; diff --git a/UI/Scheduler/UIxAppointmentEditor.m b/UI/Scheduler/UIxAppointmentEditor.m index e59596105..5033c425d 100644 --- a/UI/Scheduler/UIxAppointmentEditor.m +++ b/UI/Scheduler/UIxAppointmentEditor.m @@ -547,6 +547,7 @@ { user = [context activeUser]; delegatedAttendee = [iCalPerson new]; + [delegatedAttendee autorelease]; [delegatedAttendee setEmail: delegatedEmail]; delegatedUid = [delegatedAttendee uid]; if (delegatedUid) diff --git a/UI/Scheduler/UIxCalMainActions.m b/UI/Scheduler/UIxCalMainActions.m index 6cee2a8f6..965831bb3 100644 --- a/UI/Scheduler/UIxCalMainActions.m +++ b/UI/Scheduler/UIxCalMainActions.m @@ -118,7 +118,7 @@ webCalendars = [NSMutableDictionary dictionary]; [calSettings setObject: webCalendars forKey: @"WebCalendars"]; } - [webCalendars setObject: calendarURL forKey: calendarName]; + [webCalendars setObject: [calendarURL absoluteString] forKey: calendarName]; [settings synchronize]; } diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index 0dc4f3ebd..096c41624 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -550,7 +550,8 @@ iRANGE(2); ASSIGN (organizer, [component organizer]); [self _loadCategories]; - [self _loadAttendees]; + if (!jsonAttendees) + [self _loadAttendees]; [self _loadRRules]; [self _loadAlarms]; diff --git a/UI/Scheduler/UIxTimeDateControl.m b/UI/Scheduler/UIxTimeDateControl.m index c36b85385..cc768cb2b 100644 --- a/UI/Scheduler/UIxTimeDateControl.m +++ b/UI/Scheduler/UIxTimeDateControl.m @@ -176,9 +176,7 @@ NSMutableArray *hours; unsigned int h; - hours = [NSMutableArray new]; - [hours autorelease]; - + hours = [NSMutableArray array]; for (h = startHour; h < (endHour + 1); h++) [hours addObject: [NSNumber numberWithInt: h]]; @@ -210,9 +208,7 @@ NSMutableArray *minutes; unsigned int m; - minutes = [NSMutableArray new]; - [minutes autorelease]; - + minutes = [NSMutableArray array]; for (m = 0; m < 60; m += 15) [minutes addObject: [NSNumber numberWithInt: m]];