From a0560a56029b355607621f27a42d856ed336bc83 Mon Sep 17 00:00:00 2001 From: wolfgang Date: Tue, 28 Aug 2007 21:46:49 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1162 d1b88da0-ebda-0310-925b-ed51d893ca5b --- ChangeLog | 13 +++++++++ SoObjects/Appointments/SOGoFreeBusyObject.m | 4 +-- SoObjects/Mailer/SOGoDraftObject.h | 1 + SoObjects/Mailer/SOGoDraftObject.m | 32 +++++++++++++++++---- UI/MailerUI/UIxMailEditor.m | 7 +---- UI/MainUI/SOGoUserHomePage.m | 6 ++-- UI/WebServerResources/MailerUI.css | 2 +- 7 files changed, 48 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6c30d788..915951cb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2007-08-28 Wolfgang Sourdeau + + * SoObjects/Mailer/SOGoDraftObject.m: added support for the + "In-Reply-To" header field when replying. + + * UI/MainUI/SOGoUserHomePage.m: add the "c_" prefix to the quick + table field names that are queried. + + * SoObjects/Appointments/SOGoFreeBusyObject.m ([SOGoFreeBusyObject + -iCalStringForFreeBusyInfos:_infosfrom:_startDateto:_endDate]): + add the "c_" prefix to the quick table field names that are + queried. + 2007-08-24 Wolfgang Sourdeau * SoObjects/Appointments/SOGoAppointmentFolder.m diff --git a/SoObjects/Appointments/SOGoFreeBusyObject.m b/SoObjects/Appointments/SOGoFreeBusyObject.m index d8559111..bddee8ac 100644 --- a/SoObjects/Appointments/SOGoFreeBusyObject.m +++ b/SoObjects/Appointments/SOGoFreeBusyObject.m @@ -169,9 +169,9 @@ info = [events nextObject]; while (info) { - if ([[info objectForKey: @"isopaque"] boolValue]) + if ([[info objectForKey: @"c_isopaque"] boolValue]) { - type = [self _fbTypeForEventStatus: [info objectForKey: @"status"]]; + type = [self _fbTypeForEventStatus: [info objectForKey: @"c_status"]]; [freebusy addFreeBusyFrom: [info objectForKey: @"startDate"] to: [info objectForKey: @"endDate"] type: type]; diff --git a/SoObjects/Mailer/SOGoDraftObject.h b/SoObjects/Mailer/SOGoDraftObject.h index 0a2415e8..f2d44849 100644 --- a/SoObjects/Mailer/SOGoDraftObject.h +++ b/SoObjects/Mailer/SOGoDraftObject.h @@ -53,6 +53,7 @@ NGImap4Envelope *envelope; int IMAP4ID; NSMutableDictionary *headers; + NSString *inReplyTo; NSString *text; NSString *sourceURL; NSString *sourceFlag; diff --git a/SoObjects/Mailer/SOGoDraftObject.m b/SoObjects/Mailer/SOGoDraftObject.m index a8a63135..173e62d0 100644 --- a/SoObjects/Mailer/SOGoDraftObject.m +++ b/SoObjects/Mailer/SOGoDraftObject.m @@ -65,7 +65,8 @@ static NSString *contentTypeValue = @"text/plain; charset=utf-8"; static NSString *headerKeys[] = {@"subject", @"to", @"cc", @"bcc", - @"from", @"replyTo", nil}; + @"from", @"replyTo", + nil}; @implementation SOGoDraftObject @@ -99,6 +100,7 @@ static BOOL showTextAttachmentsInline = NO; text = @""; sourceURL = nil; sourceFlag = nil; + inReplyTo = nil; } return self; @@ -112,6 +114,7 @@ static BOOL showTextAttachmentsInline = NO; [path release]; [sourceURL release]; [sourceFlag release]; + [inReplyTo release]; [super dealloc]; } @@ -161,7 +164,7 @@ static BOOL showTextAttachmentsInline = NO; id headerValue; unsigned int count; - for (count = 0; count < 6; count++) + for (count = 0; count < 7; count++) { headerValue = [newHeaders objectForKey: headerKeys[count]]; if (headerValue) @@ -187,6 +190,11 @@ static BOOL showTextAttachmentsInline = NO; return text; } +- (void) setInReplyTo: (NSString *) newInReplyTo +{ + ASSIGN (inReplyTo, newInReplyTo); +} + - (void) setSourceURL: (NSString *) newSourceURL { ASSIGN (sourceURL, newSourceURL); @@ -208,6 +216,8 @@ static BOOL showTextAttachmentsInline = NO; [infos setObject: headers forKey: @"headers"]; if (text) [infos setObject: text forKey: @"text"]; + if (inReplyTo) + [infos setObject: inReplyTo forKey: @"inReplyTo"]; if (IMAP4ID > -1) [infos setObject: [NSNumber numberWithInt: IMAP4ID] forKey: @"IMAP4ID"]; @@ -262,6 +272,10 @@ static BOOL showTextAttachmentsInline = NO; value = [infoDict objectForKey: @"sourceFlag"]; if (value) [self setSourceFlag: value]; + + value = [infoDict objectForKey: @"inReplyTo"]; + if (value) + [self setInReplyTo: value]; } - (NSString *) relativeImap4Name @@ -469,15 +483,21 @@ static BOOL showTextAttachmentsInline = NO; - (void) fetchMailForReplying: (SOGoMailObject *) sourceMail toAll: (BOOL) toAll { - NSString *contentForReply; + NSString *contentForReply, *msgID; NSMutableDictionary *info; + NGImap4Envelope *sourceEnvelope; [sourceMail fetchCoreInfos]; info = [NSMutableDictionary dictionaryWithCapacity: 16]; [info setObject: [sourceMail subjectForReply] forKey: @"subject"]; + + sourceEnvelope = [sourceMail envelope]; [self _fillInReplyAddresses: info replyToAll: toAll - envelope: [sourceMail envelope]]; + envelope: sourceEnvelope]; + msgID = [sourceEnvelope messageID]; + if ([msgID length] > 0) + [self setInReplyTo: msgID]; contentForReply = [sourceMail contentForReply]; [self setText: contentForReply]; [self setHeaders: info]; @@ -1000,7 +1020,9 @@ static BOOL showTextAttachmentsInline = NO; [map setObjects:[map objectsForKey: @"from"] forKey: @"reply-to"]; /* add subject */ - + if (inReplyTo) + [map setObject: inReplyTo forKey: @"in-reply-to"]; + if ([(s = [headers objectForKey: @"subject"]) length] > 0) [map setObject: [s asQPSubjectString: @"utf-8"] forKey: @"subject"]; diff --git a/UI/MailerUI/UIxMailEditor.m b/UI/MailerUI/UIxMailEditor.m index a221609e..726b7970 100644 --- a/UI/MailerUI/UIxMailEditor.m +++ b/UI/MailerUI/UIxMailEditor.m @@ -73,7 +73,6 @@ @implementation UIxMailEditor -static BOOL keepMailTmpFile = NO; static BOOL showInternetMarker = NO; static BOOL useLocationBasedSentFolder = NO; static NSDictionary *internetMailHeaders = nil; @@ -85,13 +84,9 @@ static NSArray *infoKeys = nil; infoKeys = [[NSArray alloc] initWithObjects: @"subject", @"to", @"cc", @"bcc", - @"from", @"replyTo", + @"from", @"replyTo", @"inReplyTo", nil]; - keepMailTmpFile = [ud boolForKey:@"SOGoMailEditorKeepTmpFile"]; - if (keepMailTmpFile) - NSLog(@"WARNING: keeping mail files."); - useLocationBasedSentFolder = [ud boolForKey:@"SOGoUseLocationBasedSentFolder"]; diff --git a/UI/MainUI/SOGoUserHomePage.m b/UI/MainUI/SOGoUserHomePage.m index f6486993..410753ec 100644 --- a/UI/MainUI/SOGoUserHomePage.m +++ b/UI/MainUI/SOGoUserHomePage.m @@ -97,9 +97,9 @@ static NSString *defaultModule = nil; record = [records nextObject]; while (record) { - status = [record objectForKey: @"status"]; + status = [record objectForKey: @"c_status"]; - value = [[record objectForKey: @"startdate"] intValue]; + value = [[record objectForKey: @"c_startdate"] intValue]; currentDate = [NSCalendarDate dateWithTimeIntervalSince1970: value]; if ([currentDate earlierDate: startDate] == currentDate) startInterval = 0; @@ -107,7 +107,7 @@ static NSString *defaultModule = nil; startInterval = ([currentDate timeIntervalSinceDate: startDate] / 900); - value = [[record objectForKey: @"enddate"] intValue]; + value = [[record objectForKey: @"c_enddate"] intValue]; currentDate = [NSCalendarDate dateWithTimeIntervalSince1970: value]; if ([currentDate earlierDate: endDate] == endDate) endInterval = [items count] - 1; diff --git a/UI/WebServerResources/MailerUI.css b/UI/WebServerResources/MailerUI.css index 9c383e66..24261f7e 100644 --- a/UI/WebServerResources/MailerUI.css +++ b/UI/WebServerResources/MailerUI.css @@ -369,7 +369,7 @@ img.mailer_imagecontent DIV.mailer_plaincontent { font-family: monospace, fixed; - white-space: pre; + white-space: normal; font-size: inherit; margin: 0px; padding: 0px; -- 2.39.5