From e3d7df635a2a5e7bd187edf2bb1601b5a8729b6d Mon Sep 17 00:00:00 2001 From: helge Date: Tue, 28 Sep 2004 12:17:08 +0000 Subject: [PATCH] mailer work git-svn-id: http://svn.opengroupware.org/SOGo/trunk@324 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/SoObjects/Mailer/ChangeLog | 3 ++ SOGo/SoObjects/Mailer/SOGoMailAccount.m | 6 ++++ SOGo/SoObjects/Mailer/SOGoMailBaseObject.h | 5 ++++ SOGo/SoObjects/Mailer/SOGoMailBaseObject.m | 12 ++++++++ SOGo/SoObjects/Mailer/Version | 2 +- SOGo/UI/Mailer/ChangeLog | 4 +++ SOGo/UI/Mailer/GNUmakefile | 3 +- SOGo/UI/Mailer/UIxMailTree.m | 32 ++++++++++++++++++++++ SOGo/UI/Mailer/UIxMailTree.wox | 23 ++++++++++++++++ SOGo/UI/Mailer/Version | 2 +- SOGo/UI/Mailer/mailer.css | 5 ++++ SOGo/UI/Mailer/product.plist | 12 ++++++++ 12 files changed, 106 insertions(+), 3 deletions(-) diff --git a/SOGo/SoObjects/Mailer/ChangeLog b/SOGo/SoObjects/Mailer/ChangeLog index 24571823..ee2ccf2d 100644 --- a/SOGo/SoObjects/Mailer/ChangeLog +++ b/SOGo/SoObjects/Mailer/ChangeLog @@ -1,5 +1,8 @@ 2004-09-28 Helge Hess + * SOGoMailBaseObject.m, SOGoMailAccount.m: added -mailAccountFolder + method to find the active root folder along the SOPE chain (v0.9.8) + * SOGoMailAccount.m: be graceful if the IMAP4 login failed (v0.9.7) 2004-09-27 Helge Hess diff --git a/SOGo/SoObjects/Mailer/SOGoMailAccount.m b/SOGo/SoObjects/Mailer/SOGoMailAccount.m index d0ca36a9..a2442d8b 100644 --- a/SOGo/SoObjects/Mailer/SOGoMailAccount.m +++ b/SOGo/SoObjects/Mailer/SOGoMailAccount.m @@ -33,6 +33,12 @@ return [NSArray arrayWithObjects:@"INBOX", nil]; } +/* hierarchy */ + +- (SOGoMailAccount *)mailAccountFolder { + return self; +} + /* IMAP4 */ - (BOOL)useSSL { diff --git a/SOGo/SoObjects/Mailer/SOGoMailBaseObject.h b/SOGo/SoObjects/Mailer/SOGoMailBaseObject.h index 4a8221ee..e5d50070 100644 --- a/SOGo/SoObjects/Mailer/SOGoMailBaseObject.h +++ b/SOGo/SoObjects/Mailer/SOGoMailBaseObject.h @@ -33,6 +33,7 @@ @class NSURL; @class NGImap4Client; +@class SOGoMailAccount; @interface SOGoMailBaseObject : SOGoObject { @@ -41,6 +42,10 @@ - (id)initWithImap4URL:(NSURL *)_url inContainer:(id)_container; +/* hierarchy */ + +- (SOGoMailAccount *)mailAccountFolder; + /* IMAP4 */ - (NSURL *)imap4URL; diff --git a/SOGo/SoObjects/Mailer/SOGoMailBaseObject.m b/SOGo/SoObjects/Mailer/SOGoMailBaseObject.m index baffb482..589d063b 100644 --- a/SOGo/SoObjects/Mailer/SOGoMailBaseObject.m +++ b/SOGo/SoObjects/Mailer/SOGoMailBaseObject.m @@ -41,6 +41,18 @@ [super dealloc]; } +/* hierarchy */ + +- (SOGoMailAccount *)mailAccountFolder { + if (![[self container] respondsToSelector:_cmd]) { + [self logWithFormat:@"WARNING: weird container of mailfolder: %@", + [self container]]; + return nil; + } + + return [[self container] mailAccountFolder]; +} + /* IMAP4 */ - (NSString *)relativeImap4Name { diff --git a/SOGo/SoObjects/Mailer/Version b/SOGo/SoObjects/Mailer/Version index cab297dc..28292b54 100644 --- a/SOGo/SoObjects/Mailer/Version +++ b/SOGo/SoObjects/Mailer/Version @@ -1,3 +1,3 @@ # $Id$ -SUBMINOR_VERSION:=7 +SUBMINOR_VERSION:=8 diff --git a/SOGo/UI/Mailer/ChangeLog b/SOGo/UI/Mailer/ChangeLog index 3141e13b..e62deea4 100644 --- a/SOGo/UI/Mailer/ChangeLog +++ b/SOGo/UI/Mailer/ChangeLog @@ -1,3 +1,7 @@ +2004-09-28 Helge Hess + + * more work on mailer UI, added tree based on WETreeView (v0.9.4) + 2004-09-25 Helge Hess * added rsrc namespace declaration to templates (v0.9.3) diff --git a/SOGo/UI/Mailer/GNUmakefile b/SOGo/UI/Mailer/GNUmakefile index f4699a82..3f5e08ab 100644 --- a/SOGo/UI/Mailer/GNUmakefile +++ b/SOGo/UI/Mailer/GNUmakefile @@ -39,7 +39,8 @@ MailerUI_RESOURCE_FILES += \ mailer.css \ MailerUI_RESOURCE_FILES += \ - screenshots/*.png + screenshots/*.png \ + Images/*.gif MailerUI_LOCALIZED_RESOURCE_FILES += \ default.strings diff --git a/SOGo/UI/Mailer/UIxMailTree.m b/SOGo/UI/Mailer/UIxMailTree.m index 656e938f..601acf47 100644 --- a/SOGo/UI/Mailer/UIxMailTree.m +++ b/SOGo/UI/Mailer/UIxMailTree.m @@ -47,6 +47,38 @@ return self->item; } +/* tree */ + +- (NSArray *)rootNodes { + // TODO: maybe we want to add this in WETreeView for convenience? + return [NSArray arrayWithObject:[[self clientObject] mailAccountFolder]]; +} +- (NSArray *)itemChildNodes { + NSMutableArray *folders; + NSArray *names; + unsigned i, count; + + names = [[self item] toManyRelationshipKeys]; + count = [names count]; + folders = [NSMutableArray arrayWithCapacity:count]; + + for (i = 0; i < count; i++) { + id folder; + + folder = [[self item] lookupName:[names objectAtIndex:i] + inContext:[self context] + acquire:NO]; + if (folder) + [folders addObject:folder]; + } + + return folders; +} + +- (BOOL)isItemExpanded { + return YES; +} + /* notifications */ - (void)sleep { diff --git a/SOGo/UI/Mailer/UIxMailTree.wox b/SOGo/UI/Mailer/UIxMailTree.wox index 14163fe5..bd6400e3 100644 --- a/SOGo/UI/Mailer/UIxMailTree.wox +++ b/SOGo/UI/Mailer/UIxMailTree.wox @@ -5,7 +5,30 @@ xmlns:rsrc="OGo:url" xmlns:label="OGo:label" > + + + + + + diff --git a/SOGo/UI/Mailer/Version b/SOGo/UI/Mailer/Version index fc795f55..749d66dc 100644 --- a/SOGo/UI/Mailer/Version +++ b/SOGo/UI/Mailer/Version @@ -1,3 +1,3 @@ # $Id$ -SUBMINOR_VERSION:=3 +SUBMINOR_VERSION:=4 diff --git a/SOGo/UI/Mailer/mailer.css b/SOGo/UI/Mailer/mailer.css index ad2fcdcf..4557eeaa 100644 --- a/SOGo/UI/Mailer/mailer.css +++ b/SOGo/UI/Mailer/mailer.css @@ -794,3 +794,8 @@ td.monthprintview_content_dimmed { background-color: #D4D0C8; padding: 4px; } + +.treecell { + font-family: Arial, Helvetica, Verdana, Geneva, Tahoma, sans-serif; + font-size: 10pt; +} diff --git a/SOGo/UI/Mailer/product.plist b/SOGo/UI/Mailer/product.plist index 9e30f231..858516bf 100644 --- a/SOGo/UI/Mailer/product.plist +++ b/SOGo/UI/Mailer/product.plist @@ -4,6 +4,18 @@ publicResources = ( "uix.css", "mailer.css", + + "treeview_corner.gif", + "treeview_corner_minus.gif", + "treeview_corner_plus.gif", + "treeview_junction.gif", + "treeview_leaf.gif", + "treeview_leaf_corner.gif", + "treeview_line.gif", + "treeview_minus.gif", + "treeview_plus.gif", + "treeview_space.gif", + "tbird_073_accountview.png", "tbird_073_compose.png", "tbird_073_mailwelcome.png", -- 2.39.5