Changeset 1199
- Timestamp:
- 08/25/04 01:17:59
- Files:
-
- trunk/eds-feed/ChangeLog (modified) (1 diff)
- trunk/eds-feed/src/main.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/eds-feed/ChangeLog
r1169 r1199 1 Wed Aug 25 01:17:36 PDT 2004 Christian Hammond <chipx86@gnupdate.org> 2 3 * src/main.c: 4 - Set person properties when the people are initially created. 5 1 6 Wed Aug 11 03:34:12 PDT 2004 Christian Hammond <chipx86@gnupdate.org> 2 7 trunk/eds-feed/src/main.c
r1169 r1199 126 126 127 127 static void 128 set_properties(GalagoPerson *person, EContact *contact) 129 { 130 EContactName *contact_name; 131 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 } 150 } 151 152 static void 128 153 contacts_changed_cb(EBookView *book_view, const GList *contacts) 129 154 { … … 133 158 { 134 159 EContact *contact = (EContact *)l->data; 135 EContactName *contact_name;136 160 GalagoPerson *person; 137 161 const char *uid; 138 162 139 163 uid = e_contact_get_const(contact, E_CONTACT_UID); 140 contact_name = e_contact_get_const(contact, E_CONTACT_NAME);141 164 142 165 person = galago_person_new(uid, TRUE); 143 166 144 if (contact_name != NULL) 145 { 146 if (contact_name->given != NULL && *contact_name->given != '\0') 147 { 148 galago_person_set_property_string(person, 149 GALAGO_PERSON_PROP_FIRST_NAME, 150 contact_name->given); 151 } 152 153 if (contact_name->family != NULL && *contact_name->family != '\0') 154 { 155 galago_person_set_property_string(person, 156 GALAGO_PERSON_PROP_LAST_NAME, 157 contact_name->family); 158 } 159 } 167 set_properties(person, contact); 160 168 161 169 add_remove_accounts(person, contact, aim, E_CONTACT_IM_AIM); … … 177 185 EContact *contact = (EContact *)l->data; 178 186 GalagoPerson *person; 179 const char *name;180 187 const char *uid; 181 188 182 uid = e_contact_get_const(contact, E_CONTACT_UID); 183 name = e_contact_get_const(contact, E_CONTACT_FULL_NAME); 189 uid = e_contact_get_const(contact, E_CONTACT_UID); 184 190 185 191 person = galago_person_new(uid, TRUE); 192 193 set_properties(person, contact); 186 194 187 195 add_accounts(person, contact, aim, E_CONTACT_IM_AIM);
