[evolution/account-mgmt: 11/33] Adapt addressbook/gui/merging to the new ESource API.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/account-mgmt: 11/33] Adapt addressbook/gui/merging to the new ESource API.
- Date: Fri, 18 Mar 2011 01:52:56 +0000 (UTC)
commit 6a1af5d3ce39cb1e9803743a916d8e2464385b42
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]