[evolution/account-mgmt: 11/33] Adapt addressbook/gui/merging to the new ESource API.



commit f8df1b7e939330d552e8d345e76bfd38a8a1500c
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Jan 21 19:00:30 2011 -0500

    Adapt addressbook/gui/merging to the new ESource API.

 addressbook/gui/merging/eab-contact-compare.c |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c
index 398a948..eab6ac1 100644
--- a/addressbook/gui/merging/eab-contact-compare.c
+++ b/addressbook/gui/merging/eab-contact-compare.c
@@ -24,6 +24,7 @@
 #include <config.h>
 #include <ctype.h>
 #include <string.h>
+#include <libedataserver/e-source-registry.h>
 #include <libedataserverui/e-book-auth-util.h>
 #include "addressbook/util/eab-book-util.h"
 #include "eab-contact-compare.h"
@@ -541,7 +542,6 @@ eab_contact_compare (EContact *contact1, EContact *contact2)
 
 typedef struct _MatchSearchInfo MatchSearchInfo;
 struct _MatchSearchInfo {
-	ESourceList *source_list;
 	EContact *contact;
 	GList *avoid;
 	EABContactMatchQueryCallback cb;
@@ -552,9 +552,6 @@ static void
 match_search_info_free (MatchSearchInfo *info)
 {
 	if (info) {
-		if (info->source_list != NULL)
-			g_object_unref (info->source_list);
-
 		g_object_unref (info->contact);
 
 		/* This should already have been deallocated, but just in case... */
@@ -757,6 +754,7 @@ eab_contact_locate_match_full (EBook *book,
                                EABContactMatchQueryCallback cb,
                                gpointer closure)
 {
+	ESourceRegistry *registry;
 	MatchSearchInfo *info;
 	ESource *source;
 
@@ -775,10 +773,8 @@ eab_contact_locate_match_full (EBook *book,
 		return;
 	}
 
-	if (!e_book_get_addressbooks (&info->source_list, NULL))
-		return;
-
-	source = e_source_list_peek_default_source (info->source_list);
+	registry = e_source_registry_get_default ();
+	source = e_source_registry_get_default_address_book (registry);
 
 	e_load_book_source_async (
 		source, NULL, NULL, (GAsyncReadyCallback)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]