aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/tools
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/tools')
-rw-r--r--addressbook/tools/evolution-addressbook-export-list-cards.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/addressbook/tools/evolution-addressbook-export-list-cards.c b/addressbook/tools/evolution-addressbook-export-list-cards.c
index 3faf245859..c6261f6c53 100644
--- a/addressbook/tools/evolution-addressbook-export-list-cards.c
+++ b/addressbook/tools/evolution-addressbook-export-list-cards.c
@@ -461,6 +461,17 @@ e_contact_get_csv (EContact *contact,
GSList *csv_all_fields)
{
gchar *aline;
+ GList *emails;
+ guint n_emails;
+ gchar *full_name;
+
+ emails = e_contact_get_attributes (contact, E_CONTACT_EMAIL);
+ n_emails = g_list_length (emails);
+ full_name = e_contact_get (contact, E_CONTACT_FULL_NAME);
+ if (n_emails > 4)
+ g_warning ("%s: only 4 out of %i emails have been exported", full_name, n_emails);
+ g_free (full_name);
+ g_list_free_full (emails, (GDestroyNotify) e_vcard_attribute_free);
aline = e_contact_to_csv (contact, csv_all_fields);
return aline;