aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--addressbook/ChangeLog5
-rw-r--r--addressbook/gui/component/addressbook-migrate.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index f4043860ee..249f5e354d 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,5 +1,10 @@
2005-06-25 Sushma Rai <rsushma@novell.com>
+ * gui/component/addressbook-migrate.c (migrate_contacts): Setting
+ TYPE=OTHER default parameter to email attribute. Fixes #240756.
+
+2005-06-25 Sushma Rai <rsushma@novell.com>
+
* gui/contact-list-editor/Makefile.am: Linking to
libevolution-addressbook.
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, "<?xml", 5)) {
/* k, this is the nasty part. we glomb all the