aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2004-03-31 06:19:22 +0800
committerChris Toshok <toshok@src.gnome.org>2004-03-31 06:19:22 +0800
commitd87e7fd2c87f502414ed1aaacba85a1de3287917 (patch)
tree95b579cc63cbb0cda99d2fba6cc762ba51755033 /addressbook
parent11917a5d5b356bd3e9bf00f4c3963c6ce9b3ca39 (diff)
downloadgsoc2013-evolution-d87e7fd2c87f502414ed1aaacba85a1de3287917.tar.gz
gsoc2013-evolution-d87e7fd2c87f502414ed1aaacba85a1de3287917.tar.zst
gsoc2013-evolution-d87e7fd2c87f502414ed1aaacba85a1de3287917.zip
[ part of the fix for #54528, the other part is in e-d-s ]
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. svn path=/trunk/; revision=25250
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog10
-rw-r--r--addressbook/importers/evolution-vcard-importer.c16
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);