diff options
-rw-r--r-- | addressbook/ChangeLog | 10 | ||||
-rw-r--r-- | addressbook/gui/component/addressbook-migrate.c | 22 |
2 files changed, 16 insertions, 16 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 316709a5d1..4fff5379ae 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,13 @@ +2004-07-13 Rodney Dawes <dobey@novell.com> + + [ fixes #56657 ] + + * gui/component/addressbook-migrate.c (get_source_by_uri): + Replace this call with get_source_by_name () + (migrate_completion_folders): Fix the non-local folder migration + to look up sources for the migrated folders based on name, instead + of using the URI + 2004-07-12 Chris Toshok <toshok@ximian.com> [ fixes #61299 ] diff --git a/addressbook/gui/component/addressbook-migrate.c b/addressbook/gui/component/addressbook-migrate.c index 39ff162457..230dc8dd51 100644 --- a/addressbook/gui/component/addressbook-migrate.c +++ b/addressbook/gui/component/addressbook-migrate.c @@ -698,7 +698,7 @@ migrate_ldap_servers (MigrationContext *context, ESourceGroup *on_ldap_servers) } static ESource* -get_source_by_uri (ESourceList *source_list, const char *uri) +get_source_by_name (ESourceList *source_list, const char *name) { GSList *groups; GSList *g; @@ -718,14 +718,9 @@ get_source_by_uri (ESourceList *source_list, const char *uri) for (s = sources; s; s = s->next) { ESource *source = E_SOURCE (s->data); - char *source_uri = e_source_get_uri (source); - gboolean found = FALSE; + const char *source_name = e_source_peek_name (source); - if (!strcmp (uri, source_uri)) - found = TRUE; - - g_free (source_uri); - if (found) + if (!strcmp (name, source_name)) return source; } } @@ -782,16 +777,11 @@ migrate_completion_folders (MigrationContext *context) source = e_source_list_peek_source_by_uid (context->source_list, uid); } else { - char *uri; - char *semi = strchr (physical_uri, ';'); - if (semi) - uri = g_strndup (physical_uri, semi - physical_uri); - else - uri = g_strdup (physical_uri); + char *name = e_xml_get_string_prop_by_name (child, "display-name"); - source = get_source_by_uri (context->source_list, uri); + source = get_source_by_name (context->source_list, name); - g_free (uri); + g_free (name); } if (source) { |