Adium

Changeset 23345

Show
Ignore:
Timestamp:
05/08/2008 12:57:05 AM (7 months ago)
Author:
evands
Message:

When an object's address book preferences change, don't let its preferences become those of the global plugin. This fixes loss of AB data after changing a per-contact address book setting such as associating a contact with an address book card. Fixes #9303. Also, don't set the phonetic name if it's the same as the display name when adding to the address book.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Source/ESAddressBookIntegrationPlugin.m

    r23019 r23345  
    477477                                                        object:(AIListObject *)object preferenceDict:(NSDictionary *)prefDict firstTime:(BOOL)firstTime 
    478478{ 
     479        if (object) return; 
     480 
    479481    if ([group isEqualToString:PREF_GROUP_ADDRESSBOOK]) { 
    480482                BOOL                    oldCreateMetaContacts = createMetaContacts; 
     
    11231125                         
    11241126                        dict = [addressBookDict objectForKey:serviceID]; 
    1125                          
    11261127                        keysEnumerator = [[dict allKeysForObject:uniqueID] objectEnumerator]; 
    11271128                         
     
    11811182                //Set the name 
    11821183                [person setValue:[contact displayName] forKey:kABFirstNameProperty]; 
    1183                 [person setValue:[contact phoneticName] forKey:kABFirstNamePhoneticProperty]; 
    1184                  
     1184                if (![[contact phoneticName] isEqualToString:[contact displayName]]) 
     1185                        [person setValue:[contact phoneticName] forKey:kABFirstNamePhoneticProperty]; 
     1186 
    11851187                NSString                                *UID = [contact formattedUID]; 
    11861188