aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/addressbook-migrate.c
diff options
context:
space:
mode:
authorRodney Dawes <dobey@novell.com>2004-07-14 04:47:27 +0800
committerRodney Dawes <dobey@src.gnome.org>2004-07-14 04:47:27 +0800
commit4fd6c59d453fd305aef077cff76fee715a44a7a7 (patch)
tree3fcdd1a3fc01b194d2adbf8d0240320934f1800e /addressbook/gui/component/addressbook-migrate.c
parent2c164b4b0e1c6d7fbc9349d6826a676f29df6fa2 (diff)
downloadgsoc2013-evolution-4fd6c59d453fd305aef077cff76fee715a44a7a7.tar
gsoc2013-evolution-4fd6c59d453fd305aef077cff76fee715a44a7a7.tar.gz
gsoc2013-evolution-4fd6c59d453fd305aef077cff76fee715a44a7a7.tar.bz2
gsoc2013-evolution-4fd6c59d453fd305aef077cff76fee715a44a7a7.tar.lz
gsoc2013-evolution-4fd6c59d453fd305aef077cff76fee715a44a7a7.tar.xz
gsoc2013-evolution-4fd6c59d453fd305aef077cff76fee715a44a7a7.tar.zst
gsoc2013-evolution-4fd6c59d453fd305aef077cff76fee715a44a7a7.zip
[ fixes #56657 ]
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 svn path=/trunk/; revision=26643
Diffstat (limited to 'addressbook/gui/component/addressbook-migrate.c')
-rw-r--r--addressbook/gui/component/addressbook-migrate.c22
1 files changed, 6 insertions, 16 deletions
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) {