Index: addressbook/libebook/e-book.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/libebook/e-book.c,v
retrieving revision 1.62
diff -u -p -r1.62 e-book.c
--- addressbook/libebook/e-book.c	15 Jun 2006 16:41:42 -0000	1.62
+++ addressbook/libebook/e-book.c	3 Aug 2006 10:37:21 -0000
@@ -3824,6 +3824,7 @@ e_book_new_from_uri (const char *uri, GE
 	group = e_source_group_new ("", uri);
 	source = e_source_new ("", "");
 	e_source_set_group (source, group);
+	e_source_set_relative_uri (source, NULL);
 
 	book = e_book_new (source, error);
 
Index: libedataserver/e-source.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/libedataserver/e-source.c,v
retrieving revision 1.23
diff -u -p -r1.23 e-source.c
--- libedataserver/e-source.c	8 Dec 2005 08:10:40 -0000	1.23
+++ libedataserver/e-source.c	3 Aug 2006 10:40:41 -0000
@@ -435,9 +435,13 @@ e_source_build_absolute_uri (ESource *so
 	 */
 	if (*base_uri_str && *(base_uri_str + strlen (base_uri_str) - 1) == '/')
 		uri_str = g_strconcat (base_uri_str, source->priv->relative_uri, NULL);
-	else
-		uri_str = g_strconcat (base_uri_str, "/", source->priv->relative_uri,
+	else {
+		if (source->priv->relative_uri != NULL)
+			uri_str = g_strconcat (base_uri_str, "/", source->priv->relative_uri,
 				       NULL);
+		else
+			uri_str = g_strdup (base_uri_str);
+	}
 
 	return uri_str;
 }
Index: plugins/bbdb/bbdb.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/bbdb/bbdb.c,v
retrieving revision 1.15
diff -u -p -r1.15 bbdb.c
--- plugins/bbdb/bbdb.c	12 Jul 2006 14:39:21 -0000	1.15
+++ plugins/bbdb/bbdb.c	3 Aug 2006 10:46:12 -0000
@@ -326,6 +326,7 @@ enable_toggled_cb (GtkWidget *widget, gp
 {
 	struct bbdb_stuff *stuff = (struct bbdb_stuff *) data;
 	gboolean active;
+	ESource *selected_source;
 
 	active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
 
@@ -333,6 +334,10 @@ enable_toggled_cb (GtkWidget *widget, gp
 	gconf_client_set_bool (stuff->target->gconf, GCONF_KEY_ENABLE, active, NULL);
 	
 	gtk_widget_set_sensitive (stuff->option_menu, active);
+	if (active && !gconf_client_get_string (stuff->target->gconf, GCONF_KEY_WHICH_ADDRESSBOOK, NULL)) {
+		selected_source = e_source_option_menu_peek_selected (E_SOURCE_OPTION_MENU (stuff->option_menu));
+		gconf_client_set_string (stuff->target->gconf, GCONF_KEY_WHICH_ADDRESSBOOK, e_source_get_uri (selected_source), NULL);
+	}
 }
 
 static void
@@ -340,6 +345,7 @@ enable_gaim_toggled_cb (GtkWidget *widge
 {
 	struct bbdb_stuff *stuff = (struct bbdb_stuff *) data;
 	gboolean active;
+	ESource *selected_source;
 
 	active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
 
@@ -347,6 +353,10 @@ enable_gaim_toggled_cb (GtkWidget *widge
 	gconf_client_set_bool (stuff->target->gconf, GCONF_KEY_ENABLE_GAIM, active, NULL);
 	
 	gtk_widget_set_sensitive (stuff->gaim_option_menu, active);
+	if (active && !gconf_client_get_string (stuff->target->gconf, GCONF_KEY_WHICH_ADDRESSBOOK_GAIM, NULL)) {
+		selected_source = e_source_option_menu_peek_selected (E_SOURCE_OPTION_MENU (stuff->gaim_option_menu));
+		gconf_client_set_string (stuff->target->gconf, GCONF_KEY_WHICH_ADDRESSBOOK_GAIM, e_source_get_uri (selected_source), NULL);
+	}
 }
 
 static void
