merge of 'a2eae89ac32b5eb74e9d2879fd2b60d50e3e7071'

and 'b10b8128ebc4881915a970495f64caebed8fa4e9'

Monotone-Parent: a2eae89ac32b5eb74e9d2879fd2b60d50e3e7071
Monotone-Parent: b10b8128ebc4881915a970495f64caebed8fa4e9
Monotone-Revision: b9ef4467c8539893214db9196096daa10370d0a6

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2010-07-16T17:30:09
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2010-07-16 17:30:09 +00:00
commit 4500f4ad2d
3 changed files with 11 additions and 2 deletions

View File

@ -12,6 +12,11 @@
In secondaryEmail, we make sure that we loop In secondaryEmail, we make sure that we loop
in all available email address and we pick the in all available email address and we pick the
first one that doesn't match the primaryEmail first one that doesn't match the primaryEmail
* UI/Contacts/UIxContactEditor.m
UI/Contacts/UIxContactView.m - we make sure,
when excluding a type, that we reset the
local variable to nil since we might exclude
all values in our array.
2010-07-16 Wolfgang Sourdeau <wsourdeau@inverse.ca> 2010-07-16 Wolfgang Sourdeau <wsourdeau@inverse.ca>

View File

@ -282,6 +282,8 @@
if (![ce hasAttribute: @"type" havingValue: aTypeToExclude]) if (![ce hasAttribute: @"type" havingValue: aTypeToExclude])
break; break;
value = nil;
} }
} }
@ -412,7 +414,7 @@
[self _setSnapshotValue: @"telephoneNumber" [self _setSnapshotValue: @"telephoneNumber"
to: [self _simpleValueForType: @"work" inArray: elements excluding: @"fax"]]; to: [self _simpleValueForType: @"work" inArray: elements excluding: @"fax"]];
[self _setSnapshotValue: @"homeTelephoneNumber" [self _setSnapshotValue: @"homeTelephoneNumber"
to: [self _simpleValueForType: @"home" inArray: elements excluding: nil]]; to: [self _simpleValueForType: @"home" inArray: elements excluding: @"fax"]];
[self _setSnapshotValue: @"mobile" [self _setSnapshotValue: @"mobile"
to: [self _simpleValueForType: @"cell" inArray: elements excluding: nil]]; to: [self _simpleValueForType: @"cell" inArray: elements excluding: nil]];
[self _setSnapshotValue: @"facsimileTelephoneNumber" [self _setSnapshotValue: @"facsimileTelephoneNumber"

View File

@ -228,6 +228,8 @@
if (![ce hasAttribute: @"type" havingValue: aTypeToExclude]) if (![ce hasAttribute: @"type" havingValue: aTypeToExclude])
break; break;
phone = nil;
} }
} }
@ -243,7 +245,7 @@
- (NSString *) homePhone - (NSString *) homePhone
{ {
return [self _phoneOfType: @"home" withLabel: @"Home:" excluding: nil]; return [self _phoneOfType: @"home" withLabel: @"Home:" excluding: @"fax"];
} }
- (NSString *) fax - (NSString *) fax