diff options
author | Milan Crha <mcrha@redhat.com> | 2011-03-07 19:32:32 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:41:42 +0800 |
commit | cb7d85c41a7d47b87c5ff6f3cdb508efda68d85f (patch) | |
tree | a36d135f03fa245a8f594b410c1fb1a135b40435 /shell | |
parent | 3b641d44e6059ac462c23124638c1bc21c9f5b80 (diff) | |
download | gsoc2013-evolution-cb7d85c41a7d47b87c5ff6f3cdb508efda68d85f.tar gsoc2013-evolution-cb7d85c41a7d47b87c5ff6f3cdb508efda68d85f.tar.gz gsoc2013-evolution-cb7d85c41a7d47b87c5ff6f3cdb508efda68d85f.tar.bz2 gsoc2013-evolution-cb7d85c41a7d47b87c5ff6f3cdb508efda68d85f.tar.lz gsoc2013-evolution-cb7d85c41a7d47b87c5ff6f3cdb508efda68d85f.tar.xz gsoc2013-evolution-cb7d85c41a7d47b87c5ff6f3cdb508efda68d85f.tar.zst gsoc2013-evolution-cb7d85c41a7d47b87c5ff6f3cdb508efda68d85f.zip |
Bug #644107 - Local addressbooks created without relative_uri set
Diffstat (limited to 'shell')
-rw-r--r-- | shell/e-shell-migrate.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/shell/e-shell-migrate.c b/shell/e-shell-migrate.c index dbed197dce..41d829b9e6 100644 --- a/shell/e-shell-migrate.c +++ b/shell/e-shell-migrate.c @@ -819,16 +819,14 @@ merge_duplicate_local_sources (GConfClient *client, const gchar *gconf_key) } /* merging respective sources */ - for (sources = e_source_group_peek_sources (group); - sources != NULL; sources = sources->next) { + for (sources = e_source_group_peek_sources (group); sources != NULL; sources = sources->next) { GSList *liter; ESource *dupe_source = sources->data; if (!dupe_source) continue; - for (liter = e_source_group_peek_sources (first_local); - liter != NULL; liter = liter->next) { + for (liter = e_source_group_peek_sources (first_local); liter != NULL; liter = liter->next) { ESource *my_source = liter->data; const gchar *val1, *val2; @@ -861,6 +859,22 @@ merge_duplicate_local_sources (GConfClient *client, const gchar *gconf_key) to_remove = g_slist_prepend (to_remove, group); } + if (first_local) { + GSList *sources; + + for (sources = e_source_group_peek_sources (first_local); sources != NULL; sources = sources->next) { + ESource *source = sources->data; + const gchar *relative_uri; + + if (!source) + continue; + + relative_uri = e_source_peek_relative_uri (source); + if (!relative_uri || !*relative_uri) + e_source_set_relative_uri (source, e_source_peek_uid (source)); + } + } + if (!to_remove) { g_object_unref (source_list); return; |