From f46defb86ddafb07ea978d54482c32cec162c988 Mon Sep 17 00:00:00 2001 From: helge Date: Thu, 7 Jul 2005 14:11:33 +0000 Subject: [PATCH] added a special SoClass for the trash folder git-svn-id: http://svn.opengroupware.org/SOGo/trunk@688 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/SoObjects/Mailer/ChangeLog | 7 ++++++ SOGo/SoObjects/Mailer/GNUmakefile | 1 + SOGo/SoObjects/Mailer/SOGoMailAccount.m | 8 +++++- SOGo/SoObjects/Mailer/SOGoTrashFolder.h | 30 ++++++++++++++++++++++ SOGo/SoObjects/Mailer/SOGoTrashFolder.m | 33 +++++++++++++++++++++++++ SOGo/SoObjects/Mailer/Version | 2 +- SOGo/SoObjects/Mailer/product.plist | 4 +++ 7 files changed, 83 insertions(+), 2 deletions(-) create mode 100644 SOGo/SoObjects/Mailer/SOGoTrashFolder.h create mode 100644 SOGo/SoObjects/Mailer/SOGoTrashFolder.m diff --git a/SOGo/SoObjects/Mailer/ChangeLog b/SOGo/SoObjects/Mailer/ChangeLog index 9f1b93f8..6aaaa80d 100644 --- a/SOGo/SoObjects/Mailer/ChangeLog +++ b/SOGo/SoObjects/Mailer/ChangeLog @@ -1,3 +1,10 @@ +2005-07-07 Helge Hess + + * v0.9.90 + + * added specific SOGoTrashFolder.m class (subclass of SOGoMailFolder) + to allow hooking up a different UI + 2005-07-07 Helge Hess * SOGoMailAccounts.m: expose shared mailboxes retrieved via diff --git a/SOGo/SoObjects/Mailer/GNUmakefile b/SOGo/SoObjects/Mailer/GNUmakefile index 2aabb591..3072cb38 100644 --- a/SOGo/SoObjects/Mailer/GNUmakefile +++ b/SOGo/SoObjects/Mailer/GNUmakefile @@ -19,6 +19,7 @@ Mailer_OBJC_FILES += \ SOGoMailFolder.m \ SOGoMailObject.m \ SOGoMailFolderDataSource.m \ + SOGoTrashFolder.m \ \ SOGoMailBodyPart.m \ SOGoImageMailBodyPart.m \ diff --git a/SOGo/SoObjects/Mailer/SOGoMailAccount.m b/SOGo/SoObjects/Mailer/SOGoMailAccount.m index f2b7fd88..05fdcb47 100644 --- a/SOGo/SoObjects/Mailer/SOGoMailAccount.m +++ b/SOGo/SoObjects/Mailer/SOGoMailAccount.m @@ -162,8 +162,14 @@ static BOOL useAltNamespace = NO; } - (id)lookupImap4Folder:(NSString *)_key inContext:(id)_cx { - return [self lookupFolder:_key ofClassNamed:@"SOGoMailFolder" inContext:_cx]; + NSString *s; + + s = [_key isEqualToString:[self trashFolderNameInContext:_cx]] + ? @"SOGoTrashFolder" : @"SOGoMailFolder"; + + return [self lookupFolder:_key ofClassNamed:s inContext:_cx]; } + - (id)lookupDraftsFolder:(NSString *)_key inContext:(id)_ctx { return [self lookupFolder:_key ofClassNamed:@"SOGoDraftsFolder" inContext:_ctx]; diff --git a/SOGo/SoObjects/Mailer/SOGoTrashFolder.h b/SOGo/SoObjects/Mailer/SOGoTrashFolder.h new file mode 100644 index 00000000..c4089a8a --- /dev/null +++ b/SOGo/SoObjects/Mailer/SOGoTrashFolder.h @@ -0,0 +1,30 @@ +/* + Copyright (C) 2005 SKYRIX Software AG + + This file is part of OpenGroupware.org. + + OGo is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + OGo is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with OGo; see the file COPYING. If not, write to the + Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. +*/ + +#ifndef __Mailer_SOGoTrashFolder_H__ +#define __Mailer_SOGoTrashFolder_H__ + +#include + +@interface SOGoTrashFolder : SOGoMailFolder +@end + +#endif /* __Mailer_SOGoTrashFolder_H__ */ diff --git a/SOGo/SoObjects/Mailer/SOGoTrashFolder.m b/SOGo/SoObjects/Mailer/SOGoTrashFolder.m new file mode 100644 index 00000000..01cbd13d --- /dev/null +++ b/SOGo/SoObjects/Mailer/SOGoTrashFolder.m @@ -0,0 +1,33 @@ +/* + Copyright (C) 2005 SKYRIX Software AG + + This file is part of OpenGroupware.org. + + OGo is free software; you can redistribute it and/or modify it under + the terms of the GNU Lesser General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + OGo is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public + License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with OGo; see the file COPYING. If not, write to the + Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. +*/ + +#include "SOGoTrashFolder.h" +#include "common.h" + +@implementation SOGoTrashFolder + +/* folder type */ + +- (NSString *)outlookFolderClass { + return @"IPF.Trash"; +} + +@end /* SOGoTrashFolder */ diff --git a/SOGo/SoObjects/Mailer/Version b/SOGo/SoObjects/Mailer/Version index 483a62f8..cac89887 100644 --- a/SOGo/SoObjects/Mailer/Version +++ b/SOGo/SoObjects/Mailer/Version @@ -1,6 +1,6 @@ # Version file -SUBMINOR_VERSION:=89 +SUBMINOR_VERSION:=90 # v0.9.69 requires libNGMime v4.5.210 # v0.9.55 requires libNGExtensions v4.5.136 diff --git a/SOGo/SoObjects/Mailer/product.plist b/SOGo/SoObjects/Mailer/product.plist index 05085482..2c8f7360 100644 --- a/SOGo/SoObjects/Mailer/product.plist +++ b/SOGo/SoObjects/Mailer/product.plist @@ -30,6 +30,10 @@ }; }; + SOGoTrashFolder = { + superclass = "SOGoMailFolder"; + }; + SOGoMailObject = { superclass = "SOGoMailBaseObject"; }; -- 2.39.5