Monotone-Parent: d8a0de208631b406144e740ab09b4e5a92f0e66c

Monotone-Revision: 4d091aae297e1a3ea2ef11b35c1df5c2c60c6fea

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2012-04-25T21:32:18
maint-2.0.2
Wolfgang Sourdeau 2012-04-25 21:32:18 +00:00
parent f7e9f2fc7d
commit 5b59ebfe11
3 changed files with 27 additions and 19 deletions

View File

@ -1,5 +1,12 @@
2012-04-25 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/PreferencesUI/UIxPreferences.m (_extractMainIdentity:): save
the custom full name even when the configured custom email has the
same value as the system value.
* SoObjects/SOGo/SOGoUser.m (-appendSystemMailAccount): append
custom identity even though only the full name has a custom value.
* SoObjects/Mailer/SOGoDraftObject.m
(-bodyPartForAttachmentWithName:): force conversion of rfc822
content to quoted-printable, since it would otherwise risk passing

View File

@ -577,7 +577,7 @@
- (void) _appendSystemMailAccount
{
NSString *fullName, *replyTo, *imapLogin, *imapServer, *signature,
*encryption, *scheme, *action, *query, *customValue;
*encryption, *scheme, *action, *query, *customEmail;
NSMutableDictionary *mailAccount, *identity, *mailboxes, *receipts;
NSNumber *port;
NSMutableArray *identities;
@ -652,19 +652,22 @@
if ([[self domainDefaults] mailCustomFromEnabled])
{
[self userDefaults];
customValue = [_defaults mailCustomEmail];
if ([customValue length] > 0)
customEmail = [_defaults mailCustomEmail];
fullName = [_defaults mailCustomFullName];
if ([customEmail length] > 0 || [fullName length] > 0)
{
identity = [NSMutableDictionary new];
[identity setObject: customValue forKey: @"email"];
if ([customEmail length] == 0)
customEmail = [mails objectAtIndex: 0];
fullName = [_defaults mailCustomFullName];
if (![fullName length])
if ([fullName length] == 0)
{
fullName = [self cn];
if (![fullName length])
if ([fullName length] == 0)
fullName = login;
}
identity = [NSMutableDictionary new];
[identity setObject: customEmail forKey: @"email"];
[identity setObject: fullName forKey: @"fullName"];
if ([replyTo length] > 0)

View File

@ -1297,17 +1297,15 @@
returned by the user directory service. */
if ([value length] == 0
|| [[user allEmails] containsObject: value])
{
[userDefaults setMailCustomEmail: nil];
[userDefaults setMailCustomFullName: nil];
}
else
{
[userDefaults setMailCustomEmail: value];
value = [[identity objectForKey: @"fullName"]
stringByTrimmingSpaces];
[userDefaults setMailCustomFullName: value];
}
value = nil;
[userDefaults setMailCustomEmail: value];
value = [[identity objectForKey: @"fullName"]
stringByTrimmingSpaces];
if ([value length] == 0
|| [[user cn] isEqualToString: value])
value = nil;
[userDefaults setMailCustomFullName: value];
}
value = [[identity objectForKey: @"replyTo"]