Adium

Ticket #10106: patch.txt

File patch.txt, 2.0 kB (added by gshapiro, 5 months ago)

Patch to fix the problem (now with field sorting)

Line 
1 Index: AIInfoInspectorPane.m
2 ===================================================================
3 --- AIInfoInspectorPane.m       (revision 23990)
4 +++ AIInfoInspectorPane.m       (working copy)
5 @@ -748,23 +748,20 @@
6        
7         NSString *property;
8         NSEnumerator *enumerator;
9 -       NSSet *propertiesToExclude;
10 +       NSArray *propertiesToInclude;
11        
12 -       propertiesToExclude = [NSSet setWithObjects:
13 -                                                  kABUIDProperty, kABCreationDateProperty, kABModificationDateProperty, kABGroupNameProperty, kABPersonFlags, /* Internal data */
14 -                                                  kABFirstNameProperty, kABLastNameProperty, kABFirstNamePhoneticProperty, kABLastNamePhoneticProperty, /* Name */
15 -                                                  kABMiddleNameProperty, kABMiddleNamePhoneticProperty,  /* Name */
16 -                                                  kABAIMInstantProperty, kABJabberInstantProperty, kABMSNInstantProperty, /* IM data */
17 -                                                  kABYahooInstantProperty, kABICQInstantProperty, /* IM data */
18 +       propertiesToInclude = [NSArray arrayWithObjects:
19 +                                                  kABJobTitleProperty, kABDepartmentProperty, kABOrganizationProperty,         /* Work info */
20 +                                                  kABHomePageProperty, kABURLsProperty,                                                                        /* Web sites */
21 +                                                  kABEmailProperty, kABPhoneProperty, kABAddressProperty,                                      /* Contact info */
22 +                                                  kABBirthdayProperty, kABOtherDatesProperty,                                                          /* Dates */
23 +                                                  kABRelatedNamesProperty,                                                                                                     /* Relationships */
24 +                                                  kABNoteProperty,                                                                                                                     /* Notes */
25                                                    nil];
26 -       enumerator = [[ABPerson properties] objectEnumerator];
27 +
28 +       enumerator = [propertiesToInclude objectEnumerator];
29         while ((property = [enumerator nextObject])) {
30 -               /* Exclude:
31 -                *      - Known unwanted properties.
32 -                *  - Propeties with Java-style identifiers, most likely from other programs storing arbitrary data in the AB
33 -                */
34 -               if (![propertiesToExclude containsObject:property] &&
35 -                       ![property hasPrefix:@"com."] && ![property hasPrefix:@"net."] && ![property hasPrefix:@"org."]) {
36 +               if ([person valueForProperty:property]) {
37                         id value = [person valueForProperty:property];
38                         ABPropertyType propertyType = [ABPerson typeOfProperty:property];
39                         switch (propertyType) {