aboutsummaryrefslogtreecommitdiffstats
path: root/mail/importers
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2004-04-10 01:30:58 +0800
committerChris Toshok <toshok@src.gnome.org>2004-04-10 01:30:58 +0800
commit16b7fae670745f3dc7b8858e50dc08f7778f5b09 (patch)
tree2761add580f5f051916b63d8a3d81f52c9ccfeae /mail/importers
parent65ea752b795545b15ecf68bd4835c27d05f58be1 (diff)
downloadgsoc2013-evolution-16b7fae670745f3dc7b8858e50dc08f7778f5b09.tar.gz
gsoc2013-evolution-16b7fae670745f3dc7b8858e50dc08f7778f5b09.tar.zst
gsoc2013-evolution-16b7fae670745f3dc7b8858e50dc08f7778f5b09.zip
use e_destination_export_to_vcard_attribute instead of exporting to xml,
2004-04-09 Chris Toshok <toshok@ximian.com> * importers/pine-importer.c (import_contact): use e_destination_export_to_vcard_attribute instead of exporting to xml, and use e_contact_set_attributes. * em-utils.c (em_utils_camel_address_to_destination): EABDestination -> EDestination. (reply_get_composer): same (post_reply_to_message): same. * em-composer-utils.c (ask_confirm_for_unwanted_html_mail): EABDestination -> EDestination. (composer_get_message): same. svn path=/trunk/; revision=25392
Diffstat (limited to 'mail/importers')
-rw-r--r--mail/importers/pine-importer.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/mail/importers/pine-importer.c b/mail/importers/pine-importer.c
index b47030fbfd..21b0eebf02 100644
--- a/mail/importers/pine-importer.c
+++ b/mail/importers/pine-importer.c
@@ -62,7 +62,7 @@
#include "mail/mail-component.h"
#include <libebook/e-book.h>
-#include <addressbook/util/eab-destination.h>
+#include <addressbook/util/e-destination.h>
#define KEY "pine-mail-imported"
@@ -210,18 +210,19 @@ import_contact(EBook *book, char *line)
/* So ... this api is just insane ... we set plain strings as the contact email if it
is a normal contact, but need to do this xml crap for mailing lists */
for (i=0;addrs[i];i++) {
- EABDestination *d;
- char *xml;
-
- d = eab_destination_new();
- eab_destination_set_email(d, addrs[i]);
- xml = eab_destination_export(d);
- if (xml)
- list = g_list_append(list, xml);
+ EDestination *d;
+ EVCardAttribute *attr;
+
+ d = e_destination_new();
+ e_destination_set_email(d, addrs[i]);
+
+ attr = e_vcard_attribute_new (NULL, EVC_EMAIL);
+ e_destination_export_to_vcard_attribute (d, attr);
+ list = g_list_append(list, attr);
g_object_unref(d);
}
- e_contact_set(card, E_CONTACT_EMAIL, list);
- g_list_foreach(list, (GFunc)g_free, NULL);
+ e_contact_set_attributes(card, E_CONTACT_EMAIL, list);
+ g_list_foreach(list, (GFunc)e_vcard_attribute_free, NULL);
g_list_free(list);
g_strfreev(addrs);
e_contact_set(card, E_CONTACT_IS_LIST, GINT_TO_POINTER(TRUE));