aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorSushma Rai <rsushma@src.gnome.org>2005-06-25 18:19:49 +0800
committerSushma Rai <rsushma@src.gnome.org>2005-06-25 18:19:49 +0800
commit036d6c5ee8afd6d08a317923953a3ee3366e0a94 (patch)
treeaa7cb10cf38334530c0398e7e593c773b8dd251c /addressbook/gui
parent6985fa5f68eef54d066334d2d3dcafb83e7e8084 (diff)
downloadgsoc2013-evolution-036d6c5ee8afd6d08a317923953a3ee3366e0a94.tar.gz
gsoc2013-evolution-036d6c5ee8afd6d08a317923953a3ee3366e0a94.tar.zst
gsoc2013-evolution-036d6c5ee8afd6d08a317923953a3ee3366e0a94.zip
Setting TYPE=OTHER default parameter to email attribute. Fixes #240756.
svn path=/trunk/; revision=29585
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/component/addressbook-migrate.c8
1 files changed, 8 insertions, 0 deletions
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