diff options
author | Chris Toshok <toshok@ximian.com> | 2004-02-07 10:20:28 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2004-02-07 10:20:28 +0800 |
commit | fc13836aeb9433f62989228772b2831c50516a25 (patch) | |
tree | a9ac72c4f4215e0febd818f6a1d1d583eb23d622 /addressbook/gui/component | |
parent | 19864e820204ccfb9f25aa7afd82a0be5078d5fe (diff) | |
download | gsoc2013-evolution-fc13836aeb9433f62989228772b2831c50516a25.tar.gz gsoc2013-evolution-fc13836aeb9433f62989228772b2831c50516a25.tar.zst gsoc2013-evolution-fc13836aeb9433f62989228772b2831c50516a25.zip |
don't bother using a function-wide variable to store the personal source.
2004-02-06 Chris Toshok <toshok@ximian.com>
* 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
Diffstat (limited to 'addressbook/gui/component')
-rw-r--r-- | addressbook/gui/component/addressbook-migrate.c | 12 |
1 files changed, 5 insertions, 7 deletions
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; |