Index: plugins/default-source/default-source.c
===================================================================
--- plugins/default-source/default-source.c	(revision 37365)
+++ plugins/default-source/default-source.c	(working copy)
@@ -30,9 +30,13 @@
 #include <libedataserver/e-source.h>
 #include <glib/gi18n.h>
 #include <string.h>
+
 GtkWidget* org_gnome_default_book (EPlugin *epl, EConfigHookItemFactoryData *data);
+GtkWidget* org_gnome_autocomplete_book (EPlugin *epl, EConfigHookItemFactoryData *data);
+
 void commit_default_calendar (EPlugin *epl, EConfigTarget *target);
 void commit_default_book (EPlugin *epl, EConfigTarget *target);
+
 void
 commit_default_calendar (EPlugin *epl, EConfigTarget *target)
 {
@@ -69,6 +73,15 @@ default_source_changed (GtkWidget *check
 		e_source_set_property (source, "default", NULL);
 }
 
+static void
+autocomplete_book_changed (GtkWidget *check_box,  ESource *source)
+{
+
+	if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check_box)))
+		e_source_set_property (source, "completion", "true");
+	else
+		e_source_set_property (source, "completion", NULL);
+}
 
 GtkWidget *
 org_gnome_default_book (EPlugin *epl, EConfigHookItemFactoryData *data)
@@ -94,6 +107,27 @@ org_gnome_default_book (EPlugin *epl, EC
 	return widget;
 }
 
+GtkWidget *
+org_gnome_autocomplete_book (EPlugin *epl, EConfigHookItemFactoryData *data)
+{
+	GtkWidget *widget;
+	ESource *source;
+	EABConfigTargetSource *book_target;
+
+	if (data->old)
+		return data->old;
+	widget = gtk_check_button_new_with_mnemonic (_("A_utocomplete with this address book"));
+	book_target = (EABConfigTargetSource *) data->target;
+	source = book_target->source;
+
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), e_source_get_property (source, "completion") && g_str_equal (e_source_get_property (source, "completion"), "true"));
+	gtk_container_add (GTK_CONTAINER (data->parent), widget);
+
+	g_signal_connect (GTK_TOGGLE_BUTTON (widget), "toggled", G_CALLBACK (autocomplete_book_changed), source);
+	gtk_widget_show (widget);
+	return widget;
+}
+
 static const char *
 get_calendar_option_caption (ECalSourceType source_type)
 {
Index: plugins/default-source/org-gnome-default-source.eplug.xml
===================================================================
--- plugins/default-source/org-gnome-default-source.eplug.xml	(revision 37365)
+++ plugins/default-source/org-gnome-default-source.eplug.xml	(working copy)
@@ -29,6 +29,10 @@
 		 type="item"
 		 path="00.general/10.display/30.default"
 		 factory="org_gnome_default_book"/>
+                <item
+		 type="item"
+		 path="00.general/10.display/31.default"
+		 factory="org_gnome_autocomplete_book"/>
 	</group>
         </hook>
 
Index: plugins/default-source/ChangeLog
===================================================================
--- plugins/default-source/ChangeLog	(revision 37365)
+++ plugins/default-source/ChangeLog	(working copy)
@@ -1,3 +1,12 @@
+2009-03-04  Milan Crha  <mcrha@redhat.com>
+
+	** Fix for bug #373297
+
+	* org-gnome-default-source.eplug.xml:
+	* default-source.c: (org_gnome_autocomplete_book),
+	(autocomplete_book_changed):
+	Option in an address book properties for autocompletion.
+
 2008-09-04  Sankar P  <psankar@novell.com>
 
 License Changes
