Changeset 1200

Show
Ignore:
Timestamp:
08/25/04 01:23:39
Author:
chipx86
Message:

Fixed the retrieval of name information from e-d-s.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/eds-feed/ChangeLog

    r1199 r1200  
     1Wed Aug 25 01:23:12 PDT 2004  Christian Hammond <chipx86@gnupdate.org> 
     2 
     3    * src/main.c: 
     4      - Fixed the retrieval of name information from e-d-s. 
     5 
    16Wed Aug 25 01:17:36 PDT 2004  Christian Hammond <chipx86@gnupdate.org> 
    27 
  • trunk/eds-feed/src/main.c

    r1199 r1200  
    130130    EContactName *contact_name; 
    131131 
    132     contact_name = e_contact_get_const(contact, E_CONTACT_NAME); 
    133  
    134     if (contact_name != NULL) 
    135     { 
    136         if (contact_name->given != NULL && *contact_name->given != '\0') 
    137         { 
    138             galago_person_set_property_string(person, 
    139                                               GALAGO_PERSON_PROP_FIRST_NAME, 
    140                                               contact_name->given); 
    141         } 
    142  
    143         if (contact_name->family != NULL && *contact_name->family != '\0') 
    144         { 
    145             galago_person_set_property_string(person, 
    146                                               GALAGO_PERSON_PROP_LAST_NAME, 
    147                                               contact_name->family); 
    148         } 
    149     } 
     132    contact_name = e_contact_get(contact, E_CONTACT_NAME); 
     133 
     134    if (contact_name == NULL) 
     135        return; 
     136 
     137    if (contact_name->given != NULL && *contact_name->given != '\0') 
     138    { 
     139        galago_person_set_property_string(person, 
     140                                          GALAGO_PERSON_PROP_FIRST_NAME, 
     141                                          contact_name->given); 
     142    } 
     143 
     144    if (contact_name->family != NULL && *contact_name->family != '\0') 
     145    { 
     146        galago_person_set_property_string(person, 
     147                                          GALAGO_PERSON_PROP_LAST_NAME, 
     148                                          contact_name->family); 
     149    } 
     150 
     151    e_contact_name_free(contact_name); 
    150152} 
    151153