From: helge Date: Tue, 15 Feb 2005 17:40:42 +0000 (+0000) Subject: fixed Sent folder lookup X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b1bc0659564986fac654a843bd3b2336a353bc43;p=scalable-opengroupware.org fixed Sent folder lookup git-svn-id: http://svn.opengroupware.org/SOGo/trunk@568 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/SoObjects/Mailer/ChangeLog b/SOGo/SoObjects/Mailer/ChangeLog index 1e74cf3b..1538e629 100644 --- a/SOGo/SoObjects/Mailer/ChangeLog +++ b/SOGo/SoObjects/Mailer/ChangeLog @@ -1,3 +1,10 @@ +2005-02-15 Helge Hess + + * SOGoMailAccount.m: added 'SOGoSpecialFoldersInRoot' default to + make SOGo lookup Sent/Trash in the IMAP4 root instead of under + INBOX (that is, set SOGoSpecialFoldersInRoot to YES if you have + 'altnamespace' in Cyrus set to yes) (v0.9.75) + 2005-02-14 Helge Hess * v0.9.74 diff --git a/SOGo/SoObjects/Mailer/SOGoMailAccount.m b/SOGo/SoObjects/Mailer/SOGoMailAccount.m index a1eb1083..49924b4a 100644 --- a/SOGo/SoObjects/Mailer/SOGoMailAccount.m +++ b/SOGo/SoObjects/Mailer/SOGoMailAccount.m @@ -32,10 +32,13 @@ static NSArray *rootFolderNames = nil; static NSString *inboxFolderName = @"INBOX"; static NSString *draftsFolderName = @"Drafts"; static NSString *sieveFolderName = @"Filters"; +static BOOL useAltNamespace = NO; + (void)initialize { NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; - + + useAltNamespace = [ud boolForKey:@"SOGoSpecialFoldersInRoot"]; + if ([ud boolForKey:@"SOGoEnableSieveFolder"]) { rootFolderNames = [[NSArray alloc] initWithObjects: draftsFolderName, @@ -256,7 +259,7 @@ static NSString *sieveFolderName = @"Filters"; if (self->sentFolder != nil) return self->sentFolder; - folder = [self inboxFolderInContext:_ctx]; + folder = useAltNamespace ? (id)self : [self inboxFolderInContext:_ctx]; if ([folder isKindOfClass:[NSException class]]) return folder; folder = [folder lookupName:[self sentFolderNameInContext:_ctx] @@ -277,8 +280,8 @@ static NSString *sieveFolderName = @"Filters"; if (self->trashFolder != nil) return self->trashFolder; - - folder = [self inboxFolderInContext:_ctx]; + + folder = useAltNamespace ? (id)self : [self inboxFolderInContext:_ctx]; if ([folder isKindOfClass:[NSException class]]) return folder; folder = [folder lookupName:[self trashFolderNameInContext:_ctx] diff --git a/SOGo/SoObjects/Mailer/Version b/SOGo/SoObjects/Mailer/Version index b127af6b..162f9207 100644 --- a/SOGo/SoObjects/Mailer/Version +++ b/SOGo/SoObjects/Mailer/Version @@ -1,6 +1,6 @@ # Version file -SUBMINOR_VERSION:=74 +SUBMINOR_VERSION:=75 # v0.9.69 requires libNGMime v4.5.210 # v0.9.55 requires libNGExtensions v4.5.136