From 32a0b0afc551143c2ccbbd03607468d27ab7adfb Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Mon, 6 Aug 2007 15:05:19 +0000 Subject: 2007-08-06 mcrha Partial fix for bug #313221 svn path=/trunk/; revision=33960 --- addressbook/ChangeLog | 9 +++++++++ addressbook/gui/component/addressbook-migrate.c | 22 ++++++++++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 7740c27d42..d7463355c5 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,12 @@ +2007-08-06 Milan Crha + + ** Partial fix for bug #313221 + + * gui/component/addressbook-migrate.c + (migrate_contacts), (migrate_company_phone_for_local_folders): + changes as part of fixing bug #313221, + looping through all param values, not only testing first one + 2007-08-06 Milan Crha ** Partial fix for bug #427469 diff --git a/addressbook/gui/component/addressbook-migrate.c b/addressbook/gui/component/addressbook-migrate.c index 2c9d621bb8..58e27b3cd4 100644 --- a/addressbook/gui/component/addressbook-migrate.c +++ b/addressbook/gui/component/addressbook-migrate.c @@ -273,10 +273,14 @@ migrate_contacts (MigrationContext *context, EBook *old_book, EBook *new_book) EVCardAttributeParam *p = param->data; if (!strcmp (EVC_TYPE, e_vcard_attribute_param_get_name (p))) { GList *v = e_vcard_attribute_param_get_values (p); - if (v && v->data) + while (v && v->data) { if (!strcmp ("VOICE", v->data) - || !strcmp ("FAX", v->data)) + || !strcmp ("FAX", v->data)) { found = TRUE; + break; + } + v = v->next; + } } } @@ -297,10 +301,15 @@ migrate_contacts (MigrationContext *context, EBook *old_book, EBook *new_book) p = param->data; if (!strcmp (EVC_TYPE, e_vcard_attribute_param_get_name (p))) { GList *v = e_vcard_attribute_param_get_values (p); - if (v && v->data && !strcmp ("POSTAL", v->data)) { - found = TRUE; - break; + while (v && v->data ) { + if (!strcmp ("POSTAL", v->data)) { + found = TRUE; + break; + } + v = v->next; } + if (found) + break; } } @@ -937,11 +946,12 @@ migrate_company_phone_for_local_folders (MigrationContext *context, ESourceGroup EVCardAttributeParam *p = param->data; if (!strcmp (EVC_TYPE, e_vcard_attribute_param_get_name (p))) { GList *v = e_vcard_attribute_param_get_values (p); - if (v && v->data) { + while (v && v->data) { if (!strcmp ("VOICE", v->data)) found_voice = TRUE; else if (!strcmp ("WORK", v->data)) found_work = TRUE; + v = v->next; } } -- cgit