Monotone-Parent: 4ea4ae7585400501c982fe23dd2f6bf83e26c233

Monotone-Revision: db9ec5b861b659354c77dd7978e1c7f78f92de3e

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-04-20T19:34:50
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2010-04-20 19:34:50 +00:00
parent d86e2b01a2
commit c9cebfec36
2 changed files with 14 additions and 8 deletions

View File

@ -1,5 +1,9 @@
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
(-startElement:namespace:rawName:attributes:): "ignoreContent" is
no longer a BOOL but an int, and was renamed to "ignoredContent".

View File

@ -438,47 +438,49 @@
{
NSMutableDictionary *mailAccount, *identity;
NSMutableArray *identities;
NSString *name, *fullName, *imapLogin, *imapServer;
NSString *fullName, *imapLogin, *imapServer;
NSArray *mails;
unsigned int count, max;
if (!mailAccounts)
{
imapLogin = [[SOGoUserManager sharedUserManager]
getImapLoginForUID: login];
getImapLoginForUID: login];
imapServer = [self _fetchFieldForUser: @"c_imaphostname"];
if (!imapServer)
imapServer = [[self domainDefaults] imapServer];
mailAccount = [NSMutableDictionary dictionary];
name = [NSString stringWithFormat: @"%@@%@",
imapLogin, imapServer];
mailAccount = [NSMutableDictionary new];
[mailAccount setObject: imapLogin forKey: @"userName"];
[mailAccount setObject: imapServer forKey: @"serverName"];
[mailAccount setObject: name forKey: @"name"];
identities = [NSMutableArray array];
identities = [NSMutableArray new];
mails = [self allEmails];
[mailAccount setObject: [mails objectAtIndex: 0]
forKey: @"name"];
max = [mails count];
if (max > 1)
max--;
for (count = 0; count < max; count++)
{
identity = [NSMutableDictionary dictionary];
identity = [NSMutableDictionary new];
fullName = [self cn];
if (![fullName length])
fullName = login;
[identity setObject: fullName forKey: @"fullName"];
[identity setObject: [mails objectAtIndex: count] forKey: @"email"];
[identities addObject: identity];
[identity release];
}
[[identities objectAtIndex: 0] setObject: [NSNumber numberWithBool: YES]
forKey: @"isDefault"];
[mailAccount setObject: identities forKey: @"identities"];
[identities release];
mailAccounts = [NSArray arrayWithObject: mailAccount];
[mailAccounts retain];
[mailAccount release];
}
return mailAccounts;