aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog12
-rw-r--r--addressbook/gui/component/addressbook-component.c8
-rw-r--r--addressbook/gui/component/addressbook-migrate.c8
3 files changed, 20 insertions, 8 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index b1b44c4ae7..12e10b7471 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,15 @@
+2008-03-11 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Fixes part of bug #513951
+
+ * gui/component/addressbook-component.c (ensure_sources):
+ * gui/component/addressbook-migrate.c (addressbook_migrate):
+ Adapt to new meaning of xxx_component_peek_base_directory().
+
+ * gui/component/addressbook-component.c (addressbook_component_init):
+ * gui/component/addressbook-migrate.c (create_groups):
+ Use e_get_user_data_dir() instead of constructing the full path.
+
2008-02-22 Milan Crha <mcrha@redhat.com>
** Part of fix for bug #514836
diff --git a/addressbook/gui/component/addressbook-component.c b/addressbook/gui/component/addressbook-component.c
index 57de2505c4..8d02ac0d46 100644
--- a/addressbook/gui/component/addressbook-component.c
+++ b/addressbook/gui/component/addressbook-component.c
@@ -76,6 +76,7 @@ ensure_sources (AddressbookComponent *component)
ESourceGroup *on_ldap_servers;
ESource *personal_source;
char *base_uri, *base_uri_proto;
+ const gchar *base_dir;
on_this_computer = NULL;
on_ldap_servers = NULL;
@@ -86,9 +87,8 @@ ensure_sources (AddressbookComponent *component)
return;
}
- base_uri = g_build_filename (addressbook_component_peek_base_directory (component),
- "addressbook", "local",
- NULL);
+ base_dir = addressbook_component_peek_base_directory (component);
+ base_uri = g_build_filename (base_dir, "local", NULL);
base_uri_proto = g_filename_to_uri (base_uri, NULL, NULL);
@@ -486,7 +486,7 @@ addressbook_component_init (AddressbookComponent *component)
/* EPFIXME: Should use a custom one instead? */
priv->gconf_client = gconf_client_get_default ();
- priv->base_directory = g_build_filename (g_get_home_dir (), ".evolution", NULL);
+ priv->base_directory = g_build_filename (e_get_user_data_dir (), "addressbook", NULL);
component->priv = priv;
diff --git a/addressbook/gui/component/addressbook-migrate.c b/addressbook/gui/component/addressbook-migrate.c
index f1169f7547..d7c94e695f 100644
--- a/addressbook/gui/component/addressbook-migrate.c
+++ b/addressbook/gui/component/addressbook-migrate.c
@@ -449,14 +449,14 @@ create_groups (MigrationContext *context,
GSList *groups;
ESourceGroup *group;
char *base_uri, *base_uri_proto;
+ const gchar *base_dir;
*on_this_computer = NULL;
*on_ldap_servers = NULL;
*personal_source = NULL;
- base_uri = g_build_filename (addressbook_component_peek_base_directory (context->component),
- "addressbook", "local",
- NULL);
+ base_dir = addressbook_component_peek_base_directory (context->component);
+ base_uri = g_build_filename (base_dir, "local", NULL);
base_uri_proto = g_filename_to_uri (base_uri, NULL, NULL);
@@ -1171,7 +1171,7 @@ addressbook_migrate (AddressbookComponent *component, int major, int minor, int
old_path = g_build_filename (g_get_home_dir (), "evolution", "local", "Contacts", NULL);
new_path = g_build_filename (addressbook_component_peek_base_directory (component),
- "addressbook", "local", "system", NULL);
+ "local", "system", NULL);
migrate_pilot_data (old_path, new_path);
g_free (new_path);
g_free (old_path);