diff options
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/ChangeLog | 10 | ||||
-rw-r--r-- | addressbook/importers/evolution-vcard-importer.c | 16 |
2 files changed, 26 insertions, 0 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index de667447a5..ecc67cc7dd 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,5 +1,15 @@ 2004-03-30 Chris Toshok <toshok@ximian.com> + [ part of the fix for #54528, the other part is in e-d-s ] + + * importers/evolution-vcard-importer.c (process_item_fn): get and + set the PHOTO attribute before storing the contact in the book. + this has the affect of making EContact sniff the image format. + the apple addressbook doesn't give PHOTO's a TYPE. + + +2004-03-30 Chris Toshok <toshok@ximian.com> + [ fixes bug #53094 ] * gui/component/ldap-config.glade: nuke diff --git a/addressbook/importers/evolution-vcard-importer.c b/addressbook/importers/evolution-vcard-importer.c index f6fab08983..83bec58892 100644 --- a/addressbook/importers/evolution-vcard-importer.c +++ b/addressbook/importers/evolution-vcard-importer.c @@ -69,6 +69,7 @@ process_item_fn (EvolutionImporter *importer, { VCardImporter *gci = (VCardImporter *) closure; EContact *contact; + EContactPhoto *photo; if (gci->iterator == NULL) gci->iterator = gci->contactlist; @@ -89,6 +90,21 @@ process_item_fn (EvolutionImporter *importer, } contact = gci->iterator->data; + + /* Apple's addressbook.app exports PHOTO's without a TYPE + param, so let's figure out the format here if there's a + PHOTO attribute missing a TYPE param. + + this is sort of a hack, as EContact sets the type for us if + we use the setter. so let's e_contact_get + e_contact_set + on E_CONTACT_PHOTO. + */ + photo = e_contact_get (contact, E_CONTACT_PHOTO); + if (photo) { + e_contact_set (contact, E_CONTACT_PHOTO, photo); + e_contact_photo_free (photo); + } + /* FIXME Error checking */ e_book_add_contact (gci->book, contact, NULL); |