From ef2630fcf289b8692791a572634373b5e35b675b Mon Sep 17 00:00:00 2001 From: helge Date: Sun, 3 Oct 2004 00:49:39 +0000 Subject: [PATCH] fetch bodystructure git-svn-id: http://svn.opengroupware.org/SOGo/trunk@347 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/SoObjects/Mailer/SOGoMailManager.m | 3 ++- SOGo/UI/Mailer/ChangeLog | 7 +++++++ SOGo/UI/Mailer/UIxMailListView.m | 6 ++++-- SOGo/UI/Mailer/UIxMailView.m | 12 +++++++++--- SOGo/UI/Mailer/UIxMailView.wox | 7 +++---- SOGo/UI/Mailer/Version | 2 +- 6 files changed, 26 insertions(+), 11 deletions(-) diff --git a/SOGo/SoObjects/Mailer/SOGoMailManager.m b/SOGo/SoObjects/Mailer/SOGoMailManager.m index 8852c92e..1a66f0aa 100644 --- a/SOGo/SoObjects/Mailer/SOGoMailManager.m +++ b/SOGo/SoObjects/Mailer/SOGoMailManager.m @@ -385,7 +385,8 @@ static NSTimeInterval PoolScanInterval = 5 * 60; Allowed fetch keys: UID BODY.PEEK[
]<> - BODYSTRUCTURE + BODY [this is the bodystructure, supported] + BODYSTRUCTURE [not supported yet!] ENVELOPE [this is a parsed header, but does not include type] FLAGS INTERNALDATE diff --git a/SOGo/UI/Mailer/ChangeLog b/SOGo/UI/Mailer/ChangeLog index 8a9d37ca..0c540986 100644 --- a/SOGo/UI/Mailer/ChangeLog +++ b/SOGo/UI/Mailer/ChangeLog @@ -1,5 +1,12 @@ 2004-10-03 Helge Hess + * v0.9.12 + + * UIxMailListView.m: fetch size for list + + * UIxMailView.m: cache fetched message for transaction, fetch body + structure + * work on viewer (v0.9.11) * UIxMailMainFrame.wox: made toolbar floating (v0.9.10) diff --git a/SOGo/UI/Mailer/UIxMailListView.m b/SOGo/UI/Mailer/UIxMailListView.m index f048f55a..9e48347b 100644 --- a/SOGo/UI/Mailer/UIxMailListView.m +++ b/SOGo/UI/Mailer/UIxMailListView.m @@ -85,8 +85,10 @@ - (NSArray *)fetchKeys { /* Note: see SOGoMailManager.m for allowed IMAP4 keys */ static NSArray *keys = nil; - if (keys == nil) - keys = [[NSArray alloc] initWithObjects:@"FLAGS", @"ENVELOPE", nil]; + if (keys == nil) { + keys = [[NSArray alloc] initWithObjects: + @"FLAGS", @"ENVELOPE", @"RFC822.SIZE", nil]; + } return keys; } diff --git a/SOGo/UI/Mailer/UIxMailView.m b/SOGo/UI/Mailer/UIxMailView.m index 490ccc33..7276bbf6 100644 --- a/SOGo/UI/Mailer/UIxMailView.m +++ b/SOGo/UI/Mailer/UIxMailView.m @@ -54,8 +54,11 @@ - (NSArray *)fetchKeys { /* Note: see SOGoMailManager.m for allowed IMAP4 keys */ static NSArray *keys = nil; - if (keys == nil) - keys = [[NSArray alloc] initWithObjects:@"FLAGS", @"ENVELOPE", nil]; + if (keys == nil) { + /* Note: "BODY" actually returns the structure! */ + keys = [[NSArray alloc] initWithObjects: + @"FLAGS", @"ENVELOPE", @"BODY", nil]; + } return keys; } @@ -66,10 +69,13 @@ return [self->message isNotNull] ? self->message : nil; msgs = [[self clientObject] fetchParts:[self fetchKeys]]; // returns dict + // [self logWithFormat:@"M: %@", msgs]; msgs = [msgs valueForKey:@"fetch"]; if ([msgs count] == 0) return nil; - return [msgs objectAtIndex:0]; + + self->message = [[msgs objectAtIndex:0] retain]; + return self->message; } /* derived accessors */ diff --git a/SOGo/UI/Mailer/UIxMailView.wox b/SOGo/UI/Mailer/UIxMailView.wox index 20342598..6e0e2f77 100644 --- a/SOGo/UI/Mailer/UIxMailView.wox +++ b/SOGo/UI/Mailer/UIxMailView.wox @@ -69,9 +69,8 @@ - +

+ + screenshot - diff --git a/SOGo/UI/Mailer/Version b/SOGo/UI/Mailer/Version index c351558f..9cef7993 100644 --- a/SOGo/UI/Mailer/Version +++ b/SOGo/UI/Mailer/Version @@ -1,3 +1,3 @@ # $Id$ -SUBMINOR_VERSION:=11 +SUBMINOR_VERSION:=12 -- 2.39.5