Monotone-Parent: b4d6cee11ec9c823d2d085cefd2fa70df0cf827a

Monotone-Revision: 356263e44ccecc6b46fd886306e8b6e2273c29a6

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-10-23T17:46:08
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-10-23 17:46:08 +00:00
parent 529add7c30
commit 3fbd803d52
3 changed files with 25 additions and 45 deletions

View File

@@ -1,3 +1,12 @@
2007-10-23 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Mailer/SOGoMailAccount.m ([SOGoMailAccount -inboxFolderInContext:_ctx])
([SOGoMailAccount -draftsFolderInContext:_ctx])
([SOGoMailAccount -sentFolderInContext:_ctx]): no longer make use
of the "SOGoSpecialFoldersInRoot" user defaults. The folders will
no always be specified from the root instead of sometimes from the
INBOX.
2007-10-22 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/Common/UIxPageFrame.m ([UIxPageFrame -commonLocalizableStrings])

View File

@@ -50,15 +50,12 @@ static NSString *sentFolderName = nil;
static NSString *trashFolderName = nil;
static NSString *sharedFolderName = @""; // TODO: add English default
static NSString *otherUsersFolderName = @""; // TODO: add English default
static BOOL useAltNamespace = NO;
+ (void) initialize
{
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
NSString *cfgDraftsFolderName;
useAltNamespace = [ud boolForKey:@"SOGoSpecialFoldersInRoot"];
sharedFolderName = [ud stringForKey:@"SOGoSharedFolderName"];
otherUsersFolderName = [ud stringForKey:@"SOGoOtherUsersFolderName"];
cfgDraftsFolderName = [ud stringForKey:@"SOGoDraftsFolderName"];
@@ -406,21 +403,16 @@ static BOOL useAltNamespace = NO;
- (SOGoDraftsFolder *) draftsFolderInContext: (id) _ctx
{
SOGoMailFolder *lookupFolder;
// TODO: use some profile to determine real location, use a -traverse lookup
if (!draftsFolder)
{
lookupFolder = (useAltNamespace
? (id) self
: [self inboxFolderInContext:_ctx]);
if (![lookupFolder isKindOfClass: [NSException class]])
draftsFolder
= [lookupFolder lookupName: [self draftsFolderNameInContext:_ctx]
inContext: _ctx acquire: NO];
if (![draftsFolder isNotNull])
draftsFolder = [NSException exceptionWithHTTPStatus: 404 /* not found */
reason: @"did not find Drafts folder!"];
draftsFolder
= [self lookupName: [self draftsFolderNameInContext:_ctx]
inContext: _ctx acquire: NO];
// if (![draftsFolder isNotNull])
// draftsFolder = [NSException exceptionWithHTTPStatus: 404 /* not found */
// reason: @"did not find Drafts folder!"];
[draftsFolder retain];
}
@@ -429,20 +421,15 @@ static BOOL useAltNamespace = NO;
- (SOGoMailFolder *) sentFolderInContext: (id) _ctx
{
SOGoMailFolder *lookupFolder;
// TODO: use some profile to determine real location, use a -traverse lookup
if (!sentFolder)
{
lookupFolder = (useAltNamespace
? (id) self
: [self inboxFolderInContext:_ctx]);
if (![lookupFolder isKindOfClass: [NSException class]])
sentFolder = [lookupFolder lookupName: [self sentFolderNameInContext:_ctx]
inContext: _ctx acquire: NO];
if (![sentFolder isNotNull])
sentFolder = [NSException exceptionWithHTTPStatus: 404 /* not found */
reason: @"did not find Sent folder!"];
sentFolder = [self lookupName: [self sentFolderNameInContext:_ctx]
inContext: _ctx acquire: NO];
// if (![sentFolder isNotNull])
// sentFolder = [NSException exceptionWithHTTPStatus: 404 /* not found */
// reason: @"did not find Sent folder!"];
[sentFolder retain];
}
@@ -451,20 +438,13 @@ static BOOL useAltNamespace = NO;
- (SOGoMailFolder *) trashFolderInContext: (id) _ctx
{
SOGoMailFolder *lookupFolder;
// TODO: use some profile to determine real location, use a -traverse lookup
if (!trashFolder)
{
lookupFolder = (useAltNamespace
? (id) self
: [self inboxFolderInContext:_ctx]);
if (![lookupFolder isKindOfClass: [NSException class]])
trashFolder = [lookupFolder lookupName: [self trashFolderNameInContext: _ctx]
inContext: _ctx acquire: NO];
if (![trashFolder isNotNull])
trashFolder = [NSException exceptionWithHTTPStatus: 404 /* not found */
reason: @"did not find Trash folder!"];
trashFolder = [self lookupName: [self trashFolderNameInContext: _ctx]
inContext: _ctx acquire: NO];
// if (![trashFolder isNotNull])
// trashFolder = [NSException exceptionWithHTTPStatus: 404 /* not found */
// reason: @"did not find Trash folder!"];
[trashFolder retain];
}

View File

@@ -43,15 +43,6 @@ static NSString *defaultUserID = @"anyone";
@implementation SOGoMailFolder
static BOOL useAltNamespace = NO;
+ (void) initialize
{
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
useAltNamespace = [ud boolForKey:@"SOGoSpecialFoldersInRoot"];
}
- (void) _adjustOwner
{
SOGoMailAccount *mailAccount;