Index: calendar/gui/memos-component.c
===================================================================
--- calendar/gui/memos-component.c	(revision 35104)
+++ calendar/gui/memos-component.c	(working copy)
@@ -132,6 +132,7 @@ ensure_sources (MemosComponent *componen
 	ESourceGroup *on_the_web;
 	ESource *personal_source;
 	char *base_uri, *base_uri_proto;
+	const gchar *base_dir;
 
 	on_this_computer = NULL;
 	on_the_web = NULL;
@@ -142,9 +143,8 @@ ensure_sources (MemosComponent *componen
 		return;
 	}
 
-	base_uri = g_build_filename (memos_component_peek_base_directory (component),
-				     "memos", "local",
-				     NULL);
+	base_dir = memos_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);
 
@@ -1388,10 +1388,8 @@ memos_component_init (MemosComponent *co
 
 	priv = g_new0 (MemosComponentPrivate, 1);
 
-	priv->base_directory = g_build_filename (g_get_home_dir (), ".evolution", NULL);
-	priv->config_directory = g_build_filename (g_get_home_dir (),
-						   ".evolution", "memos", "config",
-						   NULL);
+	priv->base_directory = g_build_filename (e_get_user_data_dir (), "memos", NULL);
+	priv->config_directory = g_build_filename (priv->base_directory, "config", NULL);
 
 	component->priv = priv;
 	ensure_sources (component);
Index: calendar/gui/calendar-component.c
===================================================================
--- calendar/gui/calendar-component.c	(revision 35104)
+++ calendar/gui/calendar-component.c	(working copy)
@@ -161,6 +161,7 @@ ensure_sources (CalendarComponent *compo
 	ESource *personal_source;
 	ESource *birthdays_source;
 	char *base_uri, *base_uri_proto;
+	const gchar *base_dir;
 	gchar *create_source;
 
 	on_this_computer = NULL;
@@ -175,9 +176,8 @@ ensure_sources (CalendarComponent *compo
 		return;
 	}
 
-	base_uri = g_build_filename (calendar_component_peek_base_directory (component),
-				     "calendar", "local",
-				     NULL);
+	base_dir = calendar_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);
 
@@ -1726,10 +1726,8 @@ calendar_component_init (CalendarCompone
 
 	priv = g_new0 (CalendarComponentPrivate, 1);
 
-	priv->base_directory = g_build_filename (g_get_home_dir (), ".evolution", NULL);
-	priv->config_directory = g_build_filename (g_get_home_dir (),
-						   ".evolution", "calendar", "config",
-						   NULL);
+	priv->base_directory = g_build_filename (e_get_user_data_dir (), "calendar", NULL);
+	priv->config_directory = g_build_filename (priv->base_directory, "config", NULL);
 
 	/* EPFIXME: Should use a custom one instead?  Also we should add
 	 * calendar_component_peek_gconf_client().  */
Index: calendar/gui/gnome-cal.c
===================================================================
--- calendar/gui/gnome-cal.c	(revision 35104)
+++ calendar/gui/gnome-cal.c	(working copy)
@@ -2386,7 +2386,7 @@ gnome_calendar_setup_view_menus (GnomeCa
 					  "calendar",
 					  NULL);
 		path1 = g_build_filename (calendar_component_peek_base_directory (calendar_component_peek ()),
-					 "calendar", "views", NULL);
+					 "views", NULL);
 		gal_view_collection_set_storage_directories (collection,
 							     path0,
 							     path1);
Index: calendar/gui/tasks-component.c
===================================================================
--- calendar/gui/tasks-component.c	(revision 35104)
+++ calendar/gui/tasks-component.c	(working copy)
@@ -128,6 +128,7 @@ ensure_sources (TasksComponent *componen
 	ESourceGroup *on_the_web;
 	ESource *personal_source;
 	char *base_uri, *base_uri_proto;
+	const gchar *base_dir;
 
 	on_this_computer = NULL;
 	on_the_web = NULL;
@@ -138,9 +139,8 @@ ensure_sources (TasksComponent *componen
 		return;
 	}
 
-	base_uri = g_build_filename (tasks_component_peek_base_directory (component),
-				     "tasks", "local",
-				     NULL);
+	base_dir = tasks_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);
 
@@ -1449,10 +1449,8 @@ tasks_component_init (TasksComponent *co
 
 	priv = g_new0 (TasksComponentPrivate, 1);
 
-	priv->base_directory = g_build_filename (g_get_home_dir (), ".evolution", NULL);
-	priv->config_directory = g_build_filename (g_get_home_dir (),
-						   ".evolution", "tasks", "config",
-						   NULL);
+	priv->base_directory = g_build_filename (e_get_user_data_dir (), "tasks", NULL);
+	priv->config_directory = g_build_filename (priv->base_directory, "config", NULL);
 
 	component->priv = priv;
 	ensure_sources (component);
Index: calendar/gui/e-memos.c
===================================================================
--- calendar/gui/e-memos.c	(revision 35104)
+++ calendar/gui/e-memos.c	(working copy)
@@ -1155,7 +1155,7 @@ e_memos_setup_view_menus (EMemos *memos,
 					 "memos",
 					 NULL);
 		dir1 = g_build_filename (memos_component_peek_base_directory (memos_component_peek ()),
-					 "memos", "views", NULL);
+					 "views", NULL);
 		gal_view_collection_set_storage_directories (collection,
 							     dir0,
 							     dir1);
Index: calendar/gui/migration.c
===================================================================
--- calendar/gui/migration.c	(revision 35104)
+++ calendar/gui/migration.c	(working copy)
@@ -424,15 +424,15 @@ create_calendar_sources (CalendarCompone
 	GSList *groups;
 	ESourceGroup *group;
 	char *base_uri, *base_uri_proto;
+	const gchar *base_dir;
 
 	*on_this_computer = NULL;
 	*on_the_web = NULL;
 	*contacts = NULL;
 	*personal_source = NULL;
 
-	base_uri = g_build_filename (calendar_component_peek_base_directory (component),
-				     "calendar", "local",
-				     NULL);
+	base_dir = calendar_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);
 
@@ -535,13 +535,14 @@ create_task_sources (TasksComponent *com
 	GSList *groups;
 	ESourceGroup *group;
 	char *base_uri, *base_uri_proto;
+	const gchar *base_dir;
 
 	*on_this_computer = NULL;
 	*on_the_web = NULL;
 	*personal_source = NULL;
 
-	base_uri = g_build_filename (tasks_component_peek_base_directory (component),
-				     "tasks", "local", NULL);
+	base_dir = tasks_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);
 
@@ -851,7 +852,7 @@ migrate_calendars (CalendarComponent *co
 
 			old_path = g_build_filename (g_get_home_dir (), "evolution", "local", "Calendar", NULL);
 			new_path = g_build_filename (calendar_component_peek_base_directory (component),
-						     "calendar", "local", "system", NULL);
+						     "local", "system", NULL);
 			migrate_pilot_data ("calendar", "calendar", old_path, new_path);
 			g_free (new_path);
 			g_free (old_path);
@@ -993,7 +994,7 @@ migrate_tasks (TasksComponent *component
 
 			old_path = g_build_filename (g_get_home_dir (), "evolution", "local", "Tasks", NULL);
 			new_path = g_build_filename (tasks_component_peek_base_directory (component),
-						     "tasks", "local", "system", NULL);
+						     "local", "system", NULL);
 			migrate_pilot_data ("tasks", "todo", old_path, new_path);
 			g_free (new_path);
 			g_free (old_path);
@@ -1048,13 +1049,14 @@ create_memo_sources (MemosComponent *com
 	GSList *groups;
 	ESourceGroup *group;
 	char *base_uri, *base_uri_proto;
+	const gchar *base_dir;
 
 	*on_this_computer = NULL;
 	*on_the_web = NULL;
 	*personal_source = NULL;
 
-	base_uri = g_build_filename (memos_component_peek_base_directory (component),
-				     "memos", "local", NULL);
+	base_dir = memos_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);
 
@@ -1146,6 +1148,7 @@ add_gw_esource (ESourceList *source_list
 	ESourceGroup *group;
 	ESource *source;
 	GSList *ids, *temp ;
+	GError *error = NULL;
 	char *relative_uri;
 	const char *soap_port;
 	const char * use_ssl;
@@ -1180,7 +1183,11 @@ add_gw_esource (ESourceList *source_list
 	e_source_set_color_spec (source, "#EEBC60");
 	e_source_group_add_source (group, source, -1);
 
-	ids = gconf_client_get_list (client, CALENDAR_CONFIG_MEMOS_SELECTED_MEMOS, GCONF_VALUE_STRING, NULL);
+	ids = gconf_client_get_list (client, CALENDAR_CONFIG_MEMOS_SELECTED_MEMOS, GCONF_VALUE_STRING, &error);
+	if ( error != NULL ) {
+		g_warning("%s (%s) %s\n", G_STRLOC, G_STRFUNC, error->message);
+		g_error_free(error);
+	}
 	ids = g_slist_append (ids, g_strdup (e_source_peek_uid (source)));
 	gconf_client_set_list (client, CALENDAR_CONFIG_MEMOS_SELECTED_MEMOS, GCONF_VALUE_STRING, ids, NULL);
 	temp  = ids;
Index: calendar/gui/cal-search-bar.c
===================================================================
--- calendar/gui/cal-search-bar.c	(revision 35104)
+++ calendar/gui/cal-search-bar.c	(working copy)
@@ -37,6 +37,9 @@
 #include <filter/rule-editor.h>
 
 #include "cal-search-bar.h"
+#include "calendar-component.h"
+#include "memos-component.h"
+#include "tasks-component.h"
 
 #include "e-util/e-util.h"
 #include "e-util/e-error.h"
@@ -736,6 +739,7 @@ cal_search_bar_construct (CalSearchBar *
 	FilterPart *part;
 	RuleContext *search_context;
 	FilterRule  *search_rule;
+	const gchar *base_dir;
 
 	g_return_val_if_fail (IS_CAL_SEARCH_BAR (cal_search), NULL);
 
@@ -760,16 +764,18 @@ cal_search_bar_construct (CalSearchBar *
 			rule_context_add_rule, rule_context_next_rule);
 
 	if (flags == CAL_SEARCH_MEMOS_DEFAULT) {
-		userfile = g_build_filename (g_get_home_dir (), ".evolution", "memos", "searches.xml", NULL);
+		base_dir = memos_component_peek_base_directory (memos_component_peek ());
 		xmlfile = g_build_filename (SEARCH_RULE_DIR, "memotypes.xml", NULL);
 	} else if (flags == CAL_SEARCH_TASKS_DEFAULT) {
-		userfile = g_build_filename (g_get_home_dir (), ".evolution", "tasks", "searches.xml", NULL);
+		base_dir = tasks_component_peek_base_directory (tasks_component_peek ());
 		xmlfile = g_build_filename (SEARCH_RULE_DIR, "tasktypes.xml", NULL);
 	} else {
-		userfile = g_build_filename (g_get_home_dir (), ".evolution", "calendar", "searches.xml", NULL);
+		base_dir = calendar_component_peek_base_directory (calendar_component_peek ());
 		xmlfile = g_build_filename (SEARCH_RULE_DIR, "caltypes.xml", NULL);
 	}
 
+	userfile = g_build_filename (base_dir, "searches.xml", NULL);
+
 	g_object_set_data_full (G_OBJECT (search_context), "user", userfile, g_free);
 	g_object_set_data_full (G_OBJECT (search_context), "system", xmlfile, g_free);
 
Index: e-util/e-util.h
===================================================================
--- e-util/e-util.h	(revision 35104)
+++ e-util/e-util.h	(working copy)
@@ -44,6 +44,8 @@ typedef enum {
 	E_FOCUS_END
 } EFocus;
 
+const gchar *	e_get_user_data_dir		(void);
+
 char *		e_str_without_underscores	(const char *s);
 gint		e_str_compare			(gconstpointer x,
 						 gconstpointer y);
Index: e-util/e-util.c
===================================================================
--- e-util/e-util.c	(revision 35104)
+++ e-util/e-util.c	(working copy)
@@ -49,6 +49,26 @@
 #include "e-util.h"
 #include "e-util-private.h"
 
+static gchar* dirname;
+
+/**
+ * e_get_user_data_dir:
+ *
+ * Returns the base directory for Evolution-specific user data.
+ * The string is owned by Evolution and must not be modified or freed.
+ *
+ * Returns: base directory for user data
+ **/
+const gchar *
+e_get_user_data_dir (void)
+{
+	if (G_UNLIKELY (dirname == NULL))
+		dirname = g_build_filename (
+			g_get_home_dir (), ".evolution", NULL);
+
+	return dirname;
+}
+
 /**
  * e_str_without_underscores:
  * @s: the string to strip underscores from.
@@ -989,8 +1009,13 @@ void
 e_file_update_save_path (gchar *uri, gboolean free)
 {
 	GConfClient *gconf = gconf_client_get_default();
+	GError *error = NULL;
 
-	gconf_client_set_string(gconf, "/apps/evolution/mail/save_dir", uri, NULL);
+	gconf_client_set_string(gconf, "/apps/evolution/mail/save_dir", uri, &error);
+	if (error != NULL) {
+		g_warning("%s (%s) %s", G_STRLOC, G_STRFUNC, error->message);
+		g_clear_error(&error);
+	}
 	g_object_unref(gconf);
 	if (free)
 		g_free(uri);
@@ -1007,9 +1032,14 @@ gchar *
 e_file_get_save_path (void)
 {
 	GConfClient *gconf = gconf_client_get_default();
+	GError *error = NULL;
 	gchar *uri;
 
-	uri = gconf_client_get_string(gconf, "/apps/evolution/mail/save_dir", NULL);
+	uri = gconf_client_get_string(gconf, "/apps/evolution/mail/save_dir", &error);
+	if (error != NULL) {
+		g_warning("%s (%s) %s", G_STRLOC, G_STRFUNC, error->message);
+		g_clear_error(&error);
+	}
 	g_object_unref(gconf);
 
 	if (uri == NULL)
@@ -1027,7 +1057,7 @@ get_lock_filename (void)
 	static gchar *filename = NULL;
 
 	if (G_UNLIKELY (filename == NULL))
-		filename = g_build_filename (g_get_home_dir (), ".evolution", LOCK_FILE, NULL);
+		filename = g_build_filename (e_get_user_data_dir (), LOCK_FILE, NULL);
 
 	return filename;
 }
Index: e-util/e-mktemp.c
===================================================================
--- e-util/e-mktemp.c	(revision 35104)
+++ e-util/e-mktemp.c	(working copy)
@@ -110,7 +110,7 @@ get_dir (gboolean make)
 
 #ifdef TEMP_HOME
 	char *tmpdir = NULL;
-	tmpdir = g_build_filename(g_get_home_dir(), ".evolution",
+	tmpdir = g_build_filename(e_get_user_data_dir (),
 		"cache", "tmp", NULL);
 	path = g_string_new(tmpdir);
 	if (make && g_mkdir_with_parents(tmpdir, 0777) == -1) {
Index: composer/e-msg-composer.c
===================================================================
--- composer/e-msg-composer.c	(revision 35104)
+++ composer/e-msg-composer.c	(working copy)
@@ -1615,9 +1615,9 @@ autosave_manager_query_load_orphans (Aut
 	GSList *match = NULL;
 	gint len = strlen (AUTOSAVE_SEED);
 	gint load = FALSE;
-	gchar *dirname;
+	const gchar *dirname;
 
-	dirname = g_build_filename (g_get_home_dir (), ".evolution", NULL);
+	dirname = e_get_user_data_dir ();
 	dir = g_dir_open (dirname, 0, NULL);
 	if (!dir) {
 		return;
@@ -1646,7 +1646,6 @@ autosave_manager_query_load_orphans (Aut
 	}
 
 	g_dir_close (dir);
-	g_free (dirname);
 
 	if (match != NULL)
 		load = e_error_run(parent, "mail-composer:recover-autosave", NULL) == GTK_RESPONSE_YES;
@@ -1698,7 +1697,7 @@ autosave_init_file (EMsgComposer *compos
 	EMsgComposerPrivate *p = composer->priv;
 	if (p->autosave_file == NULL) {
 		p->autosave_file = g_build_filename (
-			g_get_home_dir (), ".evolution", AUTOSAVE_SEED, NULL);
+			e_get_user_data_dir (), AUTOSAVE_SEED, NULL);
 		p->autosave_fd = g_mkstemp (p->autosave_file);
 		return TRUE;
 	}
@@ -3587,13 +3586,20 @@ e_msg_composer_unrealize (GtkWidget *wid
 {
 	EMsgComposer *composer = E_MSG_COMPOSER (widget);
 	GConfClient *gconf;
+	GError *error = NULL;
 	int width, height;
 
 	gtk_window_get_size (GTK_WINDOW (composer), &width, &height);
 
 	gconf = gconf_client_get_default ();
-	gconf_client_set_int (gconf, "/apps/evolution/mail/composer/width", width, NULL);
-	gconf_client_set_int (gconf, "/apps/evolution/mail/composer/height", height, NULL);
+	if (!gconf_client_set_int (gconf, "/apps/evolution/mail/composer/width", width, &error)) {
+		g_warning("%s (%s) %s\n", G_STRLOC, G_STRFUNC, error->message);
+		g_clear_error(&error);
+	}
+	if (!gconf_client_set_int (gconf, "/apps/evolution/mail/composer/height", height, &error)) {
+		g_warning("%s (%s) %s\n", G_STRLOC, G_STRFUNC, error->message);
+		g_error_free(error);
+	}
 	g_object_unref (gconf);
 }
 
@@ -5734,7 +5740,8 @@ e_msg_composer_set_view_from (EMsgCompos
 {
 	EMsgComposerPrivate *p = composer->priv;
 	GConfClient *gconf;
-
+	GError *error = NULL;
+	
 	g_return_if_fail (E_IS_MSG_COMPOSER (composer));
 
 	if ((p->view_from && view_from) ||
@@ -5746,7 +5753,11 @@ e_msg_composer_set_view_from (EMsgCompos
 				      "state", p->view_from ? "1" : "0", NULL);
 
 	gconf = gconf_client_get_default ();
-	gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/From", view_from, NULL);
+	if (!gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/From", view_from, &error)) {
+		g_warning("%s (%s) %s\n", G_STRLOC, G_STRFUNC, error->message);
+		g_error_free(error);
+	}
+	
 	g_object_unref (gconf);
 
 	e_msg_composer_hdrs_set_visible (E_MSG_COMPOSER_HDRS (p->hdrs),
@@ -5784,7 +5795,8 @@ e_msg_composer_set_view_replyto (EMsgCom
 {
 	EMsgComposerPrivate *p = composer->priv;
 	GConfClient *gconf;
-
+	GError *error = NULL;
+	
 	g_return_if_fail (E_IS_MSG_COMPOSER (composer));
 
 	if ((p->view_replyto && view_replyto) ||
@@ -5797,7 +5809,10 @@ e_msg_composer_set_view_replyto (EMsgCom
 
 	/* we do this /only/ if the fields is in the visible_mask */
 	gconf = gconf_client_get_default ();
-	gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/ReplyTo", view_replyto, NULL);
+	if (!gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/ReplyTo", view_replyto, &error)) {
+		g_warning("%s (%s) %s\n", G_STRLOC, G_STRFUNC, error->message);
+		g_error_free(error);
+	}
 	g_object_unref (gconf);
 
 	e_msg_composer_hdrs_set_visible (E_MSG_COMPOSER_HDRS (p->hdrs),
@@ -5835,7 +5850,8 @@ e_msg_composer_set_view_to (EMsgComposer
 {
 	EMsgComposerPrivate *p = composer->priv;
 	GConfClient *gconf;
-
+	GError *error = NULL;
+	
 	g_return_if_fail (E_IS_MSG_COMPOSER (composer));
 
 	if ((p->view_to && view_to) ||
@@ -5848,7 +5864,10 @@ e_msg_composer_set_view_to (EMsgComposer
 
 	if ((E_MSG_COMPOSER_HDRS(p->hdrs))->visible_mask & E_MSG_COMPOSER_VISIBLE_TO) {
 		gconf = gconf_client_get_default ();
-		gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/To", view_to, NULL);
+		if (!gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/To", view_to, &error)) {
+			g_warning("%s (%s) %s\n", G_STRLOC, G_STRFUNC, error->message);
+			g_error_free(error);
+		}
 		g_object_unref (gconf);
 	}
 
@@ -5887,6 +5906,8 @@ void
 e_msg_composer_set_view_postto (EMsgComposer *composer, gboolean view_postto)
 {
 	GConfClient *gconf;
+	GError *error = NULL;
+	
 	EMsgComposerPrivate *p = composer->priv;
 
 	g_return_if_fail (E_IS_MSG_COMPOSER (composer));
@@ -5901,7 +5922,10 @@ e_msg_composer_set_view_postto (EMsgComp
 
 	if ((E_MSG_COMPOSER_HDRS(p->hdrs))->visible_mask & E_MSG_COMPOSER_VISIBLE_POSTTO) {
 		gconf = gconf_client_get_default ();
-		gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/PostTo", view_postto, NULL);
+		if (!gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/PostTo", view_postto, &error)) {
+			g_warning("%s (%s) %s\n", G_STRLOC, G_STRFUNC, error->message);
+			g_error_free(error);
+		}
 		g_object_unref (gconf);
 	}
 
@@ -5940,6 +5964,7 @@ void
 e_msg_composer_set_view_cc (EMsgComposer *composer, gboolean view_cc)
 {
 	GConfClient *gconf;
+	GError *error = NULL;
 	EMsgComposerPrivate *p = composer->priv;
 
 	g_return_if_fail (E_IS_MSG_COMPOSER (composer));
@@ -5954,7 +5979,10 @@ e_msg_composer_set_view_cc (EMsgComposer
 
 	if ((E_MSG_COMPOSER_HDRS (p->hdrs))->visible_mask & E_MSG_COMPOSER_VISIBLE_CC) {
 		gconf = gconf_client_get_default ();
-		gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/Cc", view_cc, NULL);
+		if (!gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/Cc", view_cc, &error)) {
+			g_warning("%s (%s) %s\n", G_STRLOC, G_STRFUNC, error->message);
+			g_error_free(error);
+		}
 		g_object_unref (gconf);
 	}
 
@@ -5994,6 +6022,7 @@ void
 e_msg_composer_set_view_bcc (EMsgComposer *composer, gboolean view_bcc)
 {
 	GConfClient *gconf;
+	GError *error = NULL;
 	EMsgComposerPrivate *p = composer->priv;
 
 	g_return_if_fail (E_IS_MSG_COMPOSER (composer));
@@ -6008,7 +6037,10 @@ e_msg_composer_set_view_bcc (EMsgCompose
 
 	if ((E_MSG_COMPOSER_HDRS (p->hdrs))->visible_mask & E_MSG_COMPOSER_VISIBLE_BCC) {
 		gconf = gconf_client_get_default ();
-		gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/Bcc", view_bcc, NULL);
+		if (!gconf_client_set_bool (gconf, "/apps/evolution/mail/composer/view/Bcc", view_bcc, &error)) {
+			g_warning("%s (%s) %s\n", G_STRLOC, G_STRFUNC, error->message);
+			g_error_free(error);
+		}
 		g_object_unref (gconf);
 	}
 
Index: mail/mail-config.c
===================================================================
--- mail/mail-config.c	(revision 35104)
+++ mail/mail-config.c	(working copy)
@@ -371,13 +371,17 @@ gconf_mime_types_changed (GConfClient *c
 void
 mail_config_init (void)
 {
+	const gchar *base_dir;
+
 	if (config)
 		return;
 
+	base_dir = mail_component_peek_base_directory (NULL);
+
 	config = g_new0 (MailConfig, 1);
 	config->gconf = gconf_client_get_default ();
 	config->mime_types = g_ptr_array_new ();
-	config->gtkrc = g_build_filename (g_get_home_dir (), ".evolution", "mail", "config", "gtkrc-mail-fonts", NULL);
+	config->gtkrc = g_build_filename (base_dir, "config", "gtkrc-mail-fonts", NULL);
 
 	mail_config_clear ();
 
Index: mail/mail-component.c
===================================================================
--- mail/mail-component.c	(revision 35104)
+++ mail/mail-component.c	(working copy)
@@ -49,6 +49,7 @@
 #include "e-util/e-icon-factory.h"
 
 #include "misc/e-info-label.h"
+#include "e-util/e-util.h"
 #include "e-util/e-error.h"
 #include "e-util/e-util-private.h"
 #include "e-util/e-logger.h"
@@ -281,7 +282,7 @@ mc_setup_local_store(MailComponent *mc)
 	camel_exception_init(&ex);
 
 	url = camel_url_new("mbox:", NULL);
-	tmp = g_strdup_printf("%s/mail/local", p->base_directory);
+	tmp = g_build_filename (p->base_directory, "local", NULL);
 	camel_url_set_path(url, tmp);
 	g_free(tmp);
 	tmp = camel_url_to_string(url, 0);
@@ -356,7 +357,7 @@ setup_search_context (MailComponent *com
 	MailComponentPrivate *priv = component->priv;
 
 	if (priv->search_context == NULL) {
-		char *user = g_build_filename(component->priv->base_directory, "mail/searches.xml", NULL);
+		char *user = g_build_filename(component->priv->base_directory, "searches.xml", NULL);
 		char *system = g_build_filename (EVOLUTION_PRIVDATADIR, "searchtypes.xml", NULL);
 
 		priv->search_context = (RuleContext *)em_search_context_new ();
@@ -1046,7 +1047,7 @@ impl_upgradeFromVersion (PortableServer_
 	component = mail_component_peek ();
 
 	camel_exception_init (&ex);
-	if (em_migrate (component->priv->base_directory, major, minor, revision, &ex) == -1) {
+	if (em_migrate (e_get_user_data_dir (), major, minor, revision, &ex) == -1) {
 		GNOME_Evolution_Component_UpgradeFailed *failedex;
 
 		failedex = GNOME_Evolution_Component_UpgradeFailed__alloc();
@@ -1208,24 +1209,16 @@ mail_component_init (MailComponent *comp
 	priv->lock = g_mutex_new();
 	priv->quit_state = -1;
 
-	priv->base_directory = g_build_filename (g_get_home_dir (), ".evolution", NULL);
-#ifdef G_OS_WIN32
-	{
-		char *p = priv->base_directory;
-		while ((p = strchr(p, '\\')))
-			*p++ = '/';
-	}
-#endif
-	if (g_mkdir_with_parents (priv->base_directory, 0777) == -1 && errno != EEXIST)
+	if (g_mkdir_with_parents (e_get_user_data_dir (), 0777) == -1 && errno != EEXIST)
 		abort ();
 
-	priv->model = em_folder_tree_model_new (priv->base_directory);
+	priv->model = em_folder_tree_model_new (e_get_user_data_dir ());
 	priv->logger = e_logger_create ("mail");
 	priv->activity_handler = e_activity_handler_new ();
 	e_activity_handler_set_logger (priv->activity_handler, priv->logger);
 	e_activity_handler_set_error_flush_time (priv->activity_handler, mail_config_get_error_timeout ()*1000);
 
-	mail_session_init (priv->base_directory);
+	mail_session_init (e_get_user_data_dir ());
 
 	priv->async_event = mail_async_event_new();
 	priv->store_hash = g_hash_table_new_full (
Index: plugins/face/face.c
===================================================================
--- plugins/face/face.c	(revision 35104)
+++ plugins/face/face.c	(working copy)
@@ -29,6 +29,7 @@
 #include <glib/gi18n.h>
 #include <mail/em-menu.h>
 #include <e-util/e-error.h>
+#include <e-util/e-util.h>
 
 #define d(x) x
 
@@ -42,7 +43,7 @@ void org_gnome_composer_face (EPlugin * 
 	GError *error = NULL;
 
 	composer = (EMsgComposer *) t->target.widget;
-	filename = g_build_filename (g_get_home_dir (), ".evolution", "faces", NULL);
+	filename = g_build_filename (e_get_user_data_dir (), "faces", NULL);
 	g_file_get_contents (filename, &file_contents, NULL, &error);
 
 	if (error) {
Index: smime/lib/e-cert-db.c
===================================================================
--- smime/lib/e-cert-db.c	(revision 35104)
+++ smime/lib/e-cert-db.c	(working copy)
@@ -87,6 +87,7 @@
 #include "plstr.h"
 #include "prprf.h"
 #include "prmem.h"
+#include "e-util/e-util.h"
 #include "e-util/e-dialog-utils.h"
 #include "e-util/e-util-private.h"
 #include <gtk/gtkmessagedialog.h>
@@ -177,18 +178,11 @@ initialize_nss (void)
 	char *evolution_dir_path;
 	gboolean success;
 
-	evolution_dir_path = g_build_filename (g_get_home_dir (), ".evolution", NULL);
-
 #ifdef G_OS_WIN32
 	/* NSS wants filenames in system codepage */
-	{
-		char *cp_path = g_win32_locale_filename_from_utf8 (evolution_dir_path);
-
-		if (cp_path) {
-			g_free (evolution_dir_path);
-			evolution_dir_path = cp_path;
-		}
-	}
+	evolution_dir_path = g_win32_locale_filename_from_utf8 (e_get_user_data_dir ());
+#else
+	evolution_dir_path = g_strdup (e_get_user_data_dir ());
 #endif
 
 	/* we initialize NSS here to make sure it only happens once */
Index: addressbook/gui/component/addressbook-migrate.c
===================================================================
--- addressbook/gui/component/addressbook-migrate.c	(revision 35104)
+++ addressbook/gui/component/addressbook-migrate.c	(working copy)
@@ -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 (AddressbookComponen
 
 			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);
Index: addressbook/gui/component/addressbook-component.c
===================================================================
--- addressbook/gui/component/addressbook-component.c	(revision 35104)
+++ addressbook/gui/component/addressbook-component.c	(working copy)
@@ -76,6 +76,7 @@ ensure_sources (AddressbookComponent *co
 	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 *co
 		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 (AddressbookC
 	/* 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;
 
