diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2013-01-24 03:59:41 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2013-01-30 21:37:15 +0800 |
commit | e583928e0401a4baea4432c5b7e12a1b1eff8c2e (patch) | |
tree | 786d3c1b3ed24456d88f3b8c6987755a08f310db /modules/vcard-inline | |
parent | 5125cdac38ced3898bdd59ed29259e4c747374f7 (diff) | |
download | gsoc2013-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 'modules/vcard-inline')
-rw-r--r-- | modules/vcard-inline/e-mail-parser-vcard-inline.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/modules/vcard-inline/e-mail-parser-vcard-inline.c b/modules/vcard-inline/e-mail-parser-vcard-inline.c index c1064dd28f..2580059b94 100644 --- a/modules/vcard-inline/e-mail-parser-vcard-inline.c +++ b/modules/vcard-inline/e-mail-parser-vcard-inline.c @@ -93,21 +93,26 @@ mail_part_vcard_inline_free (EMailPart *mail_part) } static void -client_loaded_cb (ESource *source, - GAsyncResult *result, - GSList *contact_list) +client_connect_cb (GObject *source_object, + GAsyncResult *result, + gpointer user_data) { + GSList *contact_list = user_data; EShell *shell; - EClient *client = NULL; + EClient *client; EBookClient *book_client; ESourceRegistry *registry; GSList *iter; GError *error = NULL; - e_client_utils_open_new_finish (source, result, &client, &error); + client = e_book_client_connect_finish (result, &error); + + /* Sanity check. */ + g_return_if_fail ( + ((client != NULL) && (error == NULL)) || + ((client == NULL) && (error != NULL))); if (error != NULL) { - g_warn_if_fail (client == NULL); g_warning ( "%s: Failed to open book client: %s", G_STRFUNC, error->message); @@ -115,8 +120,6 @@ client_loaded_cb (ESource *source, goto exit; } - g_return_if_fail (E_IS_BOOK_CLIENT (client)); - book_client = E_BOOK_CLIENT (client); shell = e_shell_get_default (); @@ -178,10 +181,8 @@ save_vcard_cb (WebKitDOMEventTarget *button, vcard_part->contact_list, (GCopyFunc) g_object_ref, NULL); - e_client_utils_open_new ( - source, E_CLIENT_SOURCE_TYPE_CONTACTS, - FALSE, NULL, (GAsyncReadyCallback) client_loaded_cb, - contact_list); + e_book_client_connect ( + source, NULL, client_connect_cb, contact_list); } static void |