aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2002-11-27 10:56:16 +0800
committerChris Toshok <toshok@src.gnome.org>2002-11-27 10:56:16 +0800
commit07bd8e460c6309083b57e802b7371e758af8044c (patch)
treeb29ff7d1691410421781cf2e8d0405eb285eeae7 /addressbook/backend
parentfd57ebebf43ee3149efd8443996cde5d99490129 (diff)
downloadgsoc2013-evolution-07bd8e460c6309083b57e802b7371e758af8044c.tar.gz
gsoc2013-evolution-07bd8e460c6309083b57e802b7371e758af8044c.tar.zst
gsoc2013-evolution-07bd8e460c6309083b57e802b7371e758af8044c.zip
[ roll forward from 1.2 branch, Fixes addressbook bug #28945 ] if the
2002-11-26 Chris Toshok <toshok@ximian.com> [ roll forward from 1.2 branch, Fixes addressbook bug #28945 ] * backend/ebook/e-card.c (e_card_get_vobject): if the email property is xml, get the real address from the e-destination. Fixes saving contact lists. svn path=/trunk/; revision=18942
Diffstat (limited to 'addressbook/backend')
-rw-r--r--addressbook/backend/ebook/e-card.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/addressbook/backend/ebook/e-card.c b/addressbook/backend/ebook/e-card.c
index 07926ddd84..67787a20f9 100644
--- a/addressbook/backend/ebook/e-card.c
+++ b/addressbook/backend/ebook/e-card.c
@@ -575,7 +575,15 @@ e_card_get_vobject (const ECard *card, gboolean assumeUTF8)
EIterator *iterator = e_list_get_iterator(card->email);
for ( ; e_iterator_is_valid(iterator) ;e_iterator_next(iterator) ) {
VObject *emailprop;
- emailprop = ADD_PROP_VALUE(vobj, VCEmailAddressProp, (char *) e_iterator_get(iterator));
+ char *e = (char *) e_iterator_get(iterator);
+ if (!strncmp (e, "<?xml", 5)) {
+ EDestination *dest = e_destination_import (e);
+ emailprop = ADD_PROP_VALUE(vobj, VCEmailAddressProp, e_destination_get_address (dest));
+ g_object_unref (dest);
+ }
+ else {
+ emailprop = ADD_PROP_VALUE(vobj, VCEmailAddressProp, e);
+ }
addProp (emailprop, VCInternetProp);
}
g_object_unref(iterator);