[evolution-patches] Patch to fix #56657
- From: Rodney Dawes <dobey novell com>
- To: evolution-patches lists ximian com
- Subject: [evolution-patches] Patch to fix #56657
- Date: Mon, 12 Jul 2004 16:34:05 -0400
Here is a patch to fix #56657. It fixes the migration code to look up
sources by name, instead of uri, when migrating non-local autocompletion
folders.
-- dobey
Index: gui/component/addressbook-migrate.c
===================================================================
RCS file: /cvs/gnome/evolution/addressbook/gui/component/addressbook-migrate.c,v
retrieving revision 1.32
diff -u -r1.32 addressbook-migrate.c
--- gui/component/addressbook-migrate.c 17 Jun 2004 21:59:36 -0000 1.32
+++ gui/component/addressbook-migrate.c 12 Jul 2004 20:32:06 -0000
@@ -698,7 +698,7 @@
}
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 @@
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 @@
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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]