From 036d6c5ee8afd6d08a317923953a3ee3366e0a94 Mon Sep 17 00:00:00 2001 From: Sushma Rai Date: Sat, 25 Jun 2005 10:19:49 +0000 Subject: Setting TYPE=OTHER default parameter to email attribute. Fixes #240756. svn path=/trunk/; revision=29585 --- addressbook/gui/component/addressbook-migrate.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'addressbook/gui') diff --git a/addressbook/gui/component/addressbook-migrate.c b/addressbook/gui/component/addressbook-migrate.c index ac6e9cfac5..6492e1abbe 100644 --- a/addressbook/gui/component/addressbook-migrate.c +++ b/addressbook/gui/component/addressbook-migrate.c @@ -336,8 +336,16 @@ migrate_contacts (MigrationContext *context, EBook *old_book, EBook *new_book) of attributes, so we need to go through and escape those ';'s. */ else if (!strcmp ("EMAIL", e_vcard_attribute_get_name (a))) { + GList *params; GList *v = e_vcard_attribute_get_values (a); + /* Add TYPE=OTHER if there is no type set */ + params = e_vcard_attribute_get_params (a); + if (!params) + e_vcard_attribute_add_param_with_value (a, + e_vcard_attribute_param_new (EVC_TYPE), + "OTHER"); + if (v && v->data) { if (!strncmp ((char*)v->data, "