Monotone-Parent: a822829663fdf41f5ab083e6fb2ca305b833454f

Monotone-Revision: fc73a7910531c479a442d9feae0af3acaaebaa52

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-09-01T17:31:40
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2008-09-01 17:31:40 +00:00
parent 3353a468cc
commit 95643f0e3a
2 changed files with 30 additions and 1 deletions

View File

@ -1,3 +1,14 @@
2008-09-01 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* SoObjects/Mailer/SOGoMailAccount.m ([SOGoMailAccount
+initialize]): use the user default "SOGoFallbackIMAP4Server" to
override the value of "serverName" from the actual user settings.
Fallback to "localhost" if value is unset.
* SoObjects/Mailer/SOGoMailAccount.m ([SOGoMailAccount
-imap4URLString]): use the value of SOGoFallbackIMAP4Server, as
mentionne above.
2008-08-29 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/MailerUI/UIxMailView.m ([UIxMailView

View File

@ -57,6 +57,9 @@ static NSString *trashFolderName = nil;
static NSString *sharedFolderName = @""; // TODO: add English default
static NSString *otherUsersFolderName = @""; // TODO: add English default
// this is temporary, until we allow users to manage their own accounts
static NSString *fallbackIMAP4Server = nil;
+ (void) initialize
{
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
@ -95,7 +98,16 @@ static NSString *otherUsersFolderName = @""; // TODO: add English default
else
rootFolderNames = [[NSArray alloc] initWithObjects:
draftsFolderName,
nil];
nil];
if (!fallbackIMAP4Server)
{
fallbackIMAP4Server = [ud stringForKey: @"SOGoFallbackIMAP4Server"];
if (fallbackIMAP4Server)
[fallbackIMAP4Server retain];
else
fallbackIMAP4Server = @"localhost";
}
}
- (id) init
@ -258,8 +270,14 @@ static NSString *otherUsersFolderName = @""; // TODO: add English default
escUsername
= [[username stringByEscapingURL] stringByReplacingString: @"@"
withString: @"%40"];
#if 0
// see comment about fallbackIMAP4Server above
hostString = [NSString stringWithFormat: @"%@@%@", escUsername,
[mailAccount objectForKey: @"serverName"]];
#else
hostString = [NSString stringWithFormat: @"%@@%@", escUsername,
fallbackIMAP4Server];
#endif
}
else
hostString = @"localhost";