[evolution/account-mgmt: 13/50] 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: 13/50] Adapt addressbook/gui/merging to the new ESource API.
- Date: Wed, 7 Sep 2011 16:08:51 +0000 (UTC)
commit d4a68009bef5a93fe1aa4f4d0ce5591e059b2957
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 | 15 ++++++---------
1 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c
index a25ad4e..7904ba7 100644
--- a/addressbook/gui/merging/eab-contact-compare.c
+++ b/addressbook/gui/merging/eab-contact-compare.c
@@ -28,6 +28,7 @@
#include <ctype.h>
#include <string.h>
#include <libebook/e-book-query.h>
+#include <libedataserver/e-source-registry.h>
#include <libedataserverui/e-client-utils.h>
#include "addressbook/util/eab-book-util.h"
#include "eab-contact-compare.h"
@@ -562,7 +563,6 @@ eab_contact_compare (EContact *contact1,
typedef struct _MatchSearchInfo MatchSearchInfo;
struct _MatchSearchInfo {
- ESourceList *source_list;
EContact *contact;
GList *avoid;
EABContactMatchQueryCallback cb;
@@ -573,9 +573,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... */
@@ -811,6 +808,7 @@ eab_contact_locate_match_full (EBookClient *book_client,
EABContactMatchQueryCallback cb,
gpointer closure)
{
+ ESourceRegistry *registry;
MatchSearchInfo *info;
ESource *source;
@@ -829,12 +827,11 @@ eab_contact_locate_match_full (EBookClient *book_client,
return;
}
- if (!e_book_client_get_sources (&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_client_utils_open_new (source, E_CLIENT_SOURCE_TYPE_CONTACTS, FALSE, NULL,
+ e_client_utils_open_new (
+ source, E_CLIENT_SOURCE_TYPE_CONTACTS, FALSE, NULL,
e_client_utils_authenticate_handler, NULL,
book_loaded_cb, info);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]