From 491089e194a413dcb317a6267da24144fb2ed3cd Mon Sep 17 00:00:00 2001 From: Luc Charland Date: Wed, 19 Sep 2012 09:18:00 -0400 Subject: [PATCH] Fixed bug 1929: Notifications about Modifications Notifications about Modifications don't show the Calendar name. When an email notification is selected by the user, the calendar name from which the event was changed is added to the email. Needs to be translated. --- .../Appointments/English.lproj/Localizable.strings | 1 + SoObjects/Appointments/SOGoAptMailReceipt.h | 3 +++ SoObjects/Appointments/SOGoAptMailReceipt.m | 12 ++++++++++++ SoObjects/Appointments/SOGoCalendarComponent.m | 5 ++++- UI/Templates/Appointments/SOGoAptMailReceipt.wox | 2 ++ 5 files changed, 22 insertions(+), 1 deletion(-) diff --git a/SoObjects/Appointments/English.lproj/Localizable.strings b/SoObjects/Appointments/English.lproj/Localizable.strings index 9bce92a0a..75f6d88bd 100644 --- a/SoObjects/Appointments/English.lproj/Localizable.strings +++ b/SoObjects/Appointments/English.lproj/Localizable.strings @@ -16,6 +16,7 @@ vtodo_class2 = "(Confidential task)"; "The following attendees(s) were removed:" = "The following attendee(s) were removed:"; /* IMIP messages */ +"calendar_label" = "Calendar:"; "startDate_label" = "Start:"; "endDate_label" = "End:"; "due_label" = "Due Date:"; diff --git a/SoObjects/Appointments/SOGoAptMailReceipt.h b/SoObjects/Appointments/SOGoAptMailReceipt.h index c5c909635..ffc1efe93 100644 --- a/SoObjects/Appointments/SOGoAptMailReceipt.h +++ b/SoObjects/Appointments/SOGoAptMailReceipt.h @@ -40,6 +40,7 @@ NSArray *updatedAttendees; iCalPerson *currentRecipient; SOGoEventOperation operation; + NSString *calendarName; } - (void) setOriginator: (NSString *) newOriginator; @@ -47,8 +48,10 @@ - (void) setDeletedAttendees: (NSArray *) theAttendees; - (void) setUpdatedAttendees: (NSArray *) theAttendees; - (void) setOperation: (SOGoEventOperation) theOperation; +- (void) setCalendarName: (NSString *) theCalendarName; - (NSString *) aptSummary; +- (NSString *) calendarName; @end diff --git a/SoObjects/Appointments/SOGoAptMailReceipt.m b/SoObjects/Appointments/SOGoAptMailReceipt.m index 1431b218d..5aa4295eb 100644 --- a/SoObjects/Appointments/SOGoAptMailReceipt.m +++ b/SoObjects/Appointments/SOGoAptMailReceipt.m @@ -64,6 +64,7 @@ static NSCharacterSet *wsSet = nil; addedAttendees = nil; deletedAttendees = nil; updatedAttendees = nil; + calendarName = nil; } return self; @@ -75,6 +76,7 @@ static NSCharacterSet *wsSet = nil; [addedAttendees release]; [deletedAttendees release]; [updatedAttendees release]; + [calendarName release]; [super dealloc]; } @@ -140,6 +142,16 @@ static NSCharacterSet *wsSet = nil; operation = theOperation; } +- (void) setCalendarName: (NSString *) theCalendarName +{ + ASSIGN (calendarName, theCalendarName); +} + +- (NSString *) calendarName +{ + return calendarName; +} + - (NSString *) aptSummary { NSString *s; diff --git a/SoObjects/Appointments/SOGoCalendarComponent.m b/SoObjects/Appointments/SOGoCalendarComponent.m index 8163cda53..a33d5fb4c 100644 --- a/SoObjects/Appointments/SOGoCalendarComponent.m +++ b/SoObjects/Appointments/SOGoCalendarComponent.m @@ -982,7 +982,7 @@ updatedAttendees: (NSArray *) theUpdatedAttendees operation: (SOGoEventOperation) theOperation { - NSString *mailDate, *mailText, *fullSenderEmail, *senderEmail, *fullRecipientEmail, *recipientEmail; + NSString *calendarName, *mailDate, *mailText, *fullSenderEmail, *senderEmail, *fullRecipientEmail, *recipientEmail; NSDictionary *senderIdentity, *recipientIdentity; SOGoAptMailReceipt *page; NGMutableHashMap *headerMap; @@ -990,6 +990,8 @@ SOGoUser *currentUser; SOGoDomainDefaults *dd; + calendarName = [[self container] displayName]; + // We must handle three cases here: // - Receive a mail when I modify my calendar // - Receive a mail when someone else modifies my calendar @@ -1003,6 +1005,7 @@ [page setDeletedAttendees: theDeletedAttendees]; [page setUpdatedAttendees: theUpdatedAttendees]; [page setOperation: theOperation]; + [page setCalendarName: calendarName]; currentUser = [context activeUser]; senderIdentity = [currentUser primaryIdentity]; diff --git a/UI/Templates/Appointments/SOGoAptMailReceipt.wox b/UI/Templates/Appointments/SOGoAptMailReceipt.wox index c93a1dc3e..f574903c3 100644 --- a/UI/Templates/Appointments/SOGoAptMailReceipt.wox +++ b/UI/Templates/Appointments/SOGoAptMailReceipt.wox @@ -23,6 +23,8 @@ h1, dd, .dl-list dt { margin-left: 130px; }

+
+