Monotone-Parent: 4ea4ae7585400501c982fe23dd2f6bf83e26c233
Monotone-Revision: db9ec5b861b659354c77dd7978e1c7f78f92de3e Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-04-20T19:34:50 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
d86e2b01a2
commit
c9cebfec36
|
@ -1,5 +1,9 @@
|
||||||
2010-04-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
2010-04-20 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||||
|
|
||||||
|
* SoObjects/SOGo/SOGoUser.m (-mailAccounts): use the user's first
|
||||||
|
email address as displayname for the mail account. Also, we avoid
|
||||||
|
autoreleasing objects that do not required to.
|
||||||
|
|
||||||
* UI/MailPartViewers/UIxMailPartHTMLViewer.m
|
* UI/MailPartViewers/UIxMailPartHTMLViewer.m
|
||||||
(-startElement:namespace:rawName:attributes:): "ignoreContent" is
|
(-startElement:namespace:rawName:attributes:): "ignoreContent" is
|
||||||
no longer a BOOL but an int, and was renamed to "ignoredContent".
|
no longer a BOOL but an int, and was renamed to "ignoredContent".
|
||||||
|
|
|
@ -438,7 +438,7 @@
|
||||||
{
|
{
|
||||||
NSMutableDictionary *mailAccount, *identity;
|
NSMutableDictionary *mailAccount, *identity;
|
||||||
NSMutableArray *identities;
|
NSMutableArray *identities;
|
||||||
NSString *name, *fullName, *imapLogin, *imapServer;
|
NSString *fullName, *imapLogin, *imapServer;
|
||||||
NSArray *mails;
|
NSArray *mails;
|
||||||
unsigned int count, max;
|
unsigned int count, max;
|
||||||
|
|
||||||
|
@ -449,36 +449,38 @@
|
||||||
imapServer = [self _fetchFieldForUser: @"c_imaphostname"];
|
imapServer = [self _fetchFieldForUser: @"c_imaphostname"];
|
||||||
if (!imapServer)
|
if (!imapServer)
|
||||||
imapServer = [[self domainDefaults] imapServer];
|
imapServer = [[self domainDefaults] imapServer];
|
||||||
mailAccount = [NSMutableDictionary dictionary];
|
mailAccount = [NSMutableDictionary new];
|
||||||
name = [NSString stringWithFormat: @"%@@%@",
|
|
||||||
imapLogin, imapServer];
|
|
||||||
[mailAccount setObject: imapLogin forKey: @"userName"];
|
[mailAccount setObject: imapLogin forKey: @"userName"];
|
||||||
[mailAccount setObject: imapServer forKey: @"serverName"];
|
[mailAccount setObject: imapServer forKey: @"serverName"];
|
||||||
[mailAccount setObject: name forKey: @"name"];
|
|
||||||
|
|
||||||
identities = [NSMutableArray array];
|
identities = [NSMutableArray new];
|
||||||
mails = [self allEmails];
|
mails = [self allEmails];
|
||||||
|
[mailAccount setObject: [mails objectAtIndex: 0]
|
||||||
|
forKey: @"name"];
|
||||||
|
|
||||||
max = [mails count];
|
max = [mails count];
|
||||||
if (max > 1)
|
if (max > 1)
|
||||||
max--;
|
max--;
|
||||||
for (count = 0; count < max; count++)
|
for (count = 0; count < max; count++)
|
||||||
{
|
{
|
||||||
identity = [NSMutableDictionary dictionary];
|
identity = [NSMutableDictionary new];
|
||||||
fullName = [self cn];
|
fullName = [self cn];
|
||||||
if (![fullName length])
|
if (![fullName length])
|
||||||
fullName = login;
|
fullName = login;
|
||||||
[identity setObject: fullName forKey: @"fullName"];
|
[identity setObject: fullName forKey: @"fullName"];
|
||||||
[identity setObject: [mails objectAtIndex: count] forKey: @"email"];
|
[identity setObject: [mails objectAtIndex: count] forKey: @"email"];
|
||||||
[identities addObject: identity];
|
[identities addObject: identity];
|
||||||
|
[identity release];
|
||||||
}
|
}
|
||||||
[[identities objectAtIndex: 0] setObject: [NSNumber numberWithBool: YES]
|
[[identities objectAtIndex: 0] setObject: [NSNumber numberWithBool: YES]
|
||||||
forKey: @"isDefault"];
|
forKey: @"isDefault"];
|
||||||
|
|
||||||
[mailAccount setObject: identities forKey: @"identities"];
|
[mailAccount setObject: identities forKey: @"identities"];
|
||||||
|
[identities release];
|
||||||
|
|
||||||
mailAccounts = [NSArray arrayWithObject: mailAccount];
|
mailAccounts = [NSArray arrayWithObject: mailAccount];
|
||||||
[mailAccounts retain];
|
[mailAccounts retain];
|
||||||
|
[mailAccount release];
|
||||||
}
|
}
|
||||||
|
|
||||||
return mailAccounts;
|
return mailAccounts;
|
||||||
|
|
Loading…
Reference in a new issue