From ad2ed141900e43a6a5ec2ec5bc4efe5d2599a396 Mon Sep 17 00:00:00 2001 From: helge Date: Thu, 28 Oct 2004 15:42:43 +0000 Subject: [PATCH] some cleanups git-svn-id: http://svn.opengroupware.org/SOGo/trunk@440 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/SoObjects/Mailer/ChangeLog | 5 ++++ SOGo/SoObjects/Mailer/README | 6 ++-- SOGo/SoObjects/Mailer/SOGoDraftObject.m | 37 +++++++++++-------------- SOGo/SoObjects/Mailer/Version | 5 ++-- SOGo/UI/Mailer/ChangeLog | 2 ++ SOGo/UI/Mailer/Version | 2 +- SOGo/UI/Mailer/product.plist | 4 +++ 7 files changed, 35 insertions(+), 26 deletions(-) diff --git a/SOGo/SoObjects/Mailer/ChangeLog b/SOGo/SoObjects/Mailer/ChangeLog index 2373a95d..bc440db2 100644 --- a/SOGo/SoObjects/Mailer/ChangeLog +++ b/SOGo/SoObjects/Mailer/ChangeLog @@ -1,3 +1,8 @@ +2004-10-28 Helge Hess + + * SOGoDraftObject.m: do not patch NGImap4Envelope ivars and use the new + constructor method (v0.9.44) + 2004-10-27 Helge Hess * SOGoMailManager.m: added 'SOGoIMAP4StringSeparator' default to diff --git a/SOGo/SoObjects/Mailer/README b/SOGo/SoObjects/Mailer/README index e61ff725..44ee0015 100644 --- a/SOGo/SoObjects/Mailer/README +++ b/SOGo/SoObjects/Mailer/README @@ -9,5 +9,7 @@ SOGoMailManager Defaults ======== -SOGoEnableIMAP4Debug YES|NO - enable/disable debugging in SOGoMailManager -SOGoDisableIMAP4Pooling YES|NO - disable IMAP4 connection pooling +SOGoEnableIMAP4Debug YES|NO - enable/disable debugging in SOGoMailManager +SOGoDisableIMAP4Pooling YES|NO - disable IMAP4 connection pooling +SOGoMailSpoolPath path - FS path where mail drafts are stored +SOGoNoDraftDeleteAfterSend YES|NO - makes the draft's -delete method a NOOP diff --git a/SOGo/SoObjects/Mailer/SOGoDraftObject.m b/SOGo/SoObjects/Mailer/SOGoDraftObject.m index 47f7f016..bf07045f 100644 --- a/SOGo/SoObjects/Mailer/SOGoDraftObject.m +++ b/SOGo/SoObjects/Mailer/SOGoDraftObject.m @@ -40,6 +40,11 @@ static BOOL draftDeleteDisabled = NO; // for debugging static BOOL debugOn = NO; + (void)initialize { + NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; + + if ((draftDeleteDisabled = [ud boolForKey:@"SOGoNoDraftDeleteAfterSend"])) + NSLog(@"WARNING: draft delete is disabled! (SOGoNoDraftDeleteAfterSend)"); + TextPlainType = [[NGMimeType mimeType:@"text" subType:@"plain"] copy]; MultiMixedType = [[NGMimeType mimeType:@"multipart" subType:@"mixed"] copy]; } @@ -99,11 +104,12 @@ static BOOL debugOn = NO; return NO; } if (![self _ensureDraftFolderPath]) { - [self logWithFormat:@"ERROR: could not create folder for draft!"]; + [self logWithFormat:@"ERROR: could not create folder for draft: '%@'", + [self draftFolderPath]]; return NO; } if (![_info writeToFile:[self infoPath] atomically:YES]) { - [self logWithFormat:@"ERROR: could not write info %@", [self infoPath]]; + [self logWithFormat:@"ERROR: could not write info: '%@'", [self infoPath]]; return NO; } return YES; @@ -699,25 +705,14 @@ static BOOL debugOn = NO; if ((lInfo = [self fetchInfo]) == nil) return nil; - self->envelope = [[NGImap4Envelope alloc] init]; - - self->envelope->msgId = [[self nameInContainer] copy]; - self->envelope->subject = [[lInfo objectForKey:@"subject"] copy]; - - self->envelope->from = - [[NGImap4EnvelopeAddress alloc] initWithString:[self sender]]; - - if ([(tmp = [lInfo objectForKey:@"replyTo"]) length] > 0) { - self->envelope->replyTo = - [[NGImap4EnvelopeAddress alloc] initWithString:tmp]; - } - - self->envelope->to = [[self imap4EnvelopeAddressesForStrings: - [lInfo objectForKey:@"to"]] copy]; - self->envelope->cc = [[self imap4EnvelopeAddressesForStrings: - [lInfo objectForKey:@"cc"]] copy]; - self->envelope->bcc = [[self imap4EnvelopeAddressesForStrings: - [lInfo objectForKey:@"bcc"]] copy]; + self->envelope = + [[NGImap4Envelope alloc] initWithMessageID:[self nameInContainer] + subject:[lInfo objectForKey:@"subject"] + sender:[self sender] + replyTo:[lInfo objectForKey:@"replyTo"] + to:[lInfo objectForKey:@"to"] + cc:[lInfo objectForKey:@"cc"] + bcc:[lInfo objectForKey:@"bcc"]]; return self->envelope; } diff --git a/SOGo/SoObjects/Mailer/Version b/SOGo/SoObjects/Mailer/Version index 8513b555..50b45e87 100644 --- a/SOGo/SoObjects/Mailer/Version +++ b/SOGo/SoObjects/Mailer/Version @@ -1,7 +1,8 @@ # Version file -SUBMINOR_VERSION:=43 +SUBMINOR_VERSION:=44 -# v0.9.51 requires NGMime v4.3.190 +# v0.9.44 requires NGMime v4.3.194 +# v0.9.41 requires NGMime v4.3.190 # v0.9.35 requires SOGoLogic v0.9.24 # v0.9.34 requires SOGoLogic v0.9.22 diff --git a/SOGo/UI/Mailer/ChangeLog b/SOGo/UI/Mailer/ChangeLog index 2676dedf..4ea1dc22 100644 --- a/SOGo/UI/Mailer/ChangeLog +++ b/SOGo/UI/Mailer/ChangeLog @@ -1,5 +1,7 @@ 2004-10-28 Helge Hess + * product.plist: fixed getMail for drafts folder (v0.9.56) + * UIxMailListView.wox: fixed viewer activation for unread mails (v0.9.55) diff --git a/SOGo/UI/Mailer/Version b/SOGo/UI/Mailer/Version index 572e0a09..61d11427 100644 --- a/SOGo/UI/Mailer/Version +++ b/SOGo/UI/Mailer/Version @@ -1,6 +1,6 @@ # $Id$ -SUBMINOR_VERSION:=55 +SUBMINOR_VERSION:=56 # v0.9.50 requires NGMime v4.3.190 # v0.9.43 requires NGObjWeb v4.3.73 diff --git a/SOGo/UI/Mailer/product.plist b/SOGo/UI/Mailer/product.plist index c4d605f0..c58bb716 100644 --- a/SOGo/UI/Mailer/product.plist +++ b/SOGo/UI/Mailer/product.plist @@ -299,6 +299,10 @@ protectedBy = "View"; pageName = "UIxMailListView"; }; + getMail = { + protectedBy = "View"; + pageName = "UIxMailListView"; + }; compose = { protectedBy = "View"; actionClass = "UIxMailEditorAction"; -- 2.39.5