From 837a6416319628cad34f50bcc6ebc22d7c6ca17e Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 13 Nov 2007 17:39:03 +0000 Subject: [PATCH] Monotone-Parent: 8aee58cb522e068aa5eaadc2f96fd18a32e8c998 Monotone-Revision: 5160e85c620293ddb69446e1c7a0f654bf879b2f Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-11-13T17:39:03 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 8 ++++++++ UI/Scheduler/UIxComponentEditor.m | 29 +++++++++++++++-------------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index e0a3bda96..8cce529f3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-11-13 Wolfgang Sourdeau + + * UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor + -setComponent:newComponent]): check that newComponent is non-nil + before replacing the default values. + ([UIxComponentEditor -calendarList]): privacy is already an ivar. + We don't need to refetch it. + 2007-11-12 Wolfgang Sourdeau * SoObjects/Mailer/SOGoDraftObject.m ([SOGoDraftObject diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index 0c07730d8..70ddaa55c 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -148,18 +148,20 @@ co = [self clientObject]; componentOwner = [co ownerInContext: nil]; - - ASSIGN (title, [component summary]); - ASSIGN (location, [component location]); - ASSIGN (comment, [component comment]); - ASSIGN (url, [[component url] absoluteString]); - ASSIGN (privacy, [component accessClass]); - ASSIGN (priority, [component priority]); - ASSIGN (status, [component status]); - ASSIGN (categories, [[component categories] commaSeparatedValues]); - ASSIGN (organizer, [component organizer]); - [self _loadCategories]; - [self _loadAttendees]; + if (component) + { + ASSIGN (title, [component summary]); + ASSIGN (location, [component location]); + ASSIGN (comment, [component comment]); + ASSIGN (url, [[component url] absoluteString]); + ASSIGN (privacy, [component accessClass]); + ASSIGN (priority, [component priority]); + ASSIGN (status, [component status]); + ASSIGN (categories, [[component categories] commaSeparatedValues]); + ASSIGN (organizer, [component organizer]); + [self _loadCategories]; + [self _loadAttendees]; + } } // /* cycles */ // if ([component isRecurrent]) @@ -336,7 +338,7 @@ SOGoAppointmentFolders *calendarParent; NSEnumerator *allCalendars; SoSecurityManager *sm; - NSString *perm, *privacy; + NSString *perm; if (!calendarList) { @@ -344,7 +346,6 @@ if ([[self clientObject] isNew]) perm = SoPerm_AddDocumentsImagesAndFiles; else { - privacy = [component accessClass]; if ([privacy isEqualToString: @"PRIVATE"]) perm = SOGoCalendarPerm_ModifyPrivateRecords; else if ([privacy isEqualToString: @"CONFIDENTIAL"])