aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/pst-import/pst-importer.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/pst-import/pst-importer.c
parent5125cdac38ced3898bdd59ed29259e4c747374f7 (diff)
downloadgsoc2013-evolution-e583928e0401a4baea4432c5b7e12a1b1eff8c2e.tar.gz
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/pst-import/pst-importer.c')
-rw-r--r--plugins/pst-import/pst-importer.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/plugins/pst-import/pst-importer.c b/plugins/pst-import/pst-importer.c
index e20d09a958..0389d25bb6 100644
--- a/plugins/pst-import/pst-importer.c
+++ b/plugins/pst-import/pst-importer.c
@@ -616,20 +616,24 @@ org_credativ_evolution_readpst_getwidget (EImport *ei,
}
static void
-client_opened_cb (GObject *source_object,
- GAsyncResult *result,
- gpointer user_data)
+client_connect_cb (GObject *source_object,
+ GAsyncResult *result,
+ gpointer user_data)
{
PstImporter *m = user_data;
+ EClient *client;
GError *error = NULL;
- EClient *client = NULL;
g_return_if_fail (result != NULL);
g_return_if_fail (m != NULL);
g_return_if_fail (m->waiting_open > 0);
- if (!e_client_utils_open_new_finish (E_SOURCE (source_object), result, &client, &error))
- client = NULL;
+ client = e_book_client_connect_finish (result, &error);
+
+ /* Sanity check. */
+ g_return_if_fail (
+ ((client != NULL) && (error == NULL)) ||
+ ((client == NULL) && (error != NULL)));
if (error)
g_debug ("%s: Failed to open client: %s", G_STRFUNC, error->message);
@@ -681,9 +685,7 @@ open_client (PstImporter *m,
m->waiting_open++;
- e_client_utils_open_new (
- source, source_type, FALSE, m->cancellable,
- client_opened_cb, m);
+ e_book_client_connect (source, m->cancellable, client_connect_cb, m);
g_object_unref (source);
}