From fc13836aeb9433f62989228772b2831c50516a25 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Sat, 7 Feb 2004 02:20:28 +0000 Subject: don't bother using a function-wide variable to store the personal source. 2004-02-06 Chris Toshok * gui/component/addressbook-migrate.c (create_groups): don't bother using a function-wide variable to store the personal source. also, use g_build_filename properly (because fejj is a whiner.) (migrate_local_folders): same (wrt fejj whining). svn path=/trunk/; revision=24667 --- addressbook/gui/component/addressbook-migrate.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'addressbook/gui/component/addressbook-migrate.c') diff --git a/addressbook/gui/component/addressbook-migrate.c b/addressbook/gui/component/addressbook-migrate.c index 3ea90d0495..fbee686175 100644 --- a/addressbook/gui/component/addressbook-migrate.c +++ b/addressbook/gui/component/addressbook-migrate.c @@ -360,14 +360,13 @@ create_groups (MigrationContext *context, { GSList *groups; ESourceGroup *group; - ESource *source = NULL; char *base_uri, *base_uri_proto; *on_this_computer = NULL; *on_ldap_servers = NULL; base_uri = g_build_filename (addressbook_component_peek_base_directory (context->component), - "/addressbook/local/", + "addressbook", "local", NULL); base_uri_proto = g_strconcat ("file://", base_uri, NULL); @@ -409,9 +408,9 @@ create_groups (MigrationContext *context, *on_this_computer = group; } - if (!source) { + if (!*personal_source) { /* Create the default Person addressbook */ - source = e_source_new (_("Personal"), PERSONAL_RELATIVE_URI); + ESource *source = e_source_new (_("Personal"), PERSONAL_RELATIVE_URI); e_source_group_add_source (*on_this_computer, source, -1); *personal_source = source; @@ -441,10 +440,9 @@ migrate_local_folders (MigrationContext *context, ESourceGroup *on_this_computer dirs = e_folder_map_local_folders (old_path, "contacts"); /* migrate the local addressbook first, to local/system */ - local_contact_folder = g_build_filename (g_get_home_dir (), "/evolution/local/Contacts", + local_contact_folder = g_build_filename (g_get_home_dir (), + "evolution", "local", "Contacts", NULL); - if (personal_source) - for (l = dirs; l; l = l->next) { char *source_name; -- cgit v1.2.3