mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-11 16:28:51 +00:00
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:
@@ -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])
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user