aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/bbdb/bbdb.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-01-24 03:59:41 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-01-30 21:37:15 +0800
commite583928e0401a4baea4432c5b7e12a1b1eff8c2e (patch)
tree786d3c1b3ed24456d88f3b8c6987755a08f310db /plugins/bbdb/bbdb.c
parent5125cdac38ced3898bdd59ed29259e4c747374f7 (diff)
downloadgsoc2013-evolution-e583928e0401a4baea4432c5b7e12a1b1eff8c2e.tar
gsoc2013-evolution-e583928e0401a4baea4432c5b7e12a1b1eff8c2e.tar.gz
gsoc2013-evolution-e583928e0401a4baea4432c5b7e12a1b1eff8c2e.tar.bz2
gsoc2013-evolution-e583928e0401a4baea4432c5b7e12a1b1eff8c2e.tar.lz
gsoc2013-evolution-e583928e0401a4baea4432c5b7e12a1b1eff8c2e.tar.xz
gsoc2013-evolution-e583928e0401a4baea4432c5b7e12a1b1eff8c2e.tar.zst
gsoc2013-evolution-e583928e0401a4baea4432c5b7e12a1b1eff8c2e.zip
Use e_book_client_connect().
Instead of e_client_utils_open_new() and e_book_client_new().
Diffstat (limited to 'plugins/bbdb/bbdb.c')
-rw-r--r--plugins/bbdb/bbdb.c30
1 files changed, 4 insertions, 26 deletions
diff --git a/plugins/bbdb/bbdb.c b/plugins/bbdb/bbdb.c
index 7187f6e376..568bd90733 100644
--- a/plugins/bbdb/bbdb.c
+++ b/plugins/bbdb/bbdb.c
@@ -137,7 +137,7 @@ bbdb_do_in_thread (gpointer data)
EBookClient *client = data;
/* Open the addressbook */
- if (!client || !bbdb_open_book_client (client)) {
+ if (client == NULL) {
G_LOCK (todo);
g_slist_foreach (todo, (GFunc) free_todo_struct, NULL);
@@ -370,7 +370,7 @@ bbdb_create_book_client (gint type)
EShell *shell;
ESource *source = NULL;
ESourceRegistry *registry;
- EBookClient *client = NULL;
+ EClient *client = NULL;
GSettings *settings;
gboolean enable = TRUE;
gchar *uid;
@@ -406,7 +406,7 @@ bbdb_create_book_client (gint type)
if (source == NULL)
source = e_source_registry_ref_builtin_address_book (registry);
- client = e_book_client_new (source, &error);
+ client = e_book_client_connect_sync (source, NULL, &error);
if (client == NULL) {
g_warning (
"bbdb: Failed to get addressbook: %s\n",
@@ -416,29 +416,7 @@ bbdb_create_book_client (gint type)
g_object_unref (source);
- return client;
-}
-
-gboolean
-bbdb_open_book_client (EBookClient *client)
-{
- GError *error = NULL;
-
- if (!client)
- return FALSE;
-
- e_client_open_sync (E_CLIENT (client), FALSE, NULL, &error);
-
- if (error != NULL) {
- g_warning (
- "bbdb: failed to open addressbook: %s",
- error->message);
- g_object_unref (client);
- g_error_free (error);
- return FALSE;
- }
-
- return TRUE;
+ return (EBookClient *) client;
}
gboolean