aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-12-16 23:07:46 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-12-22 17:46:19 +0800
commitea82d4be5876f8adb5d958359019d76b65669841 (patch)
treed7ece60114472fe2d5b50d73b76e2c0484393daf /src
parent08dfc1a2e4c9dd8e01cab338127c15d6a7ab51de (diff)
downloadgsoc2013-empathy-ea82d4be5876f8adb5d958359019d76b65669841.tar
gsoc2013-empathy-ea82d4be5876f8adb5d958359019d76b65669841.tar.gz
gsoc2013-empathy-ea82d4be5876f8adb5d958359019d76b65669841.tar.bz2
gsoc2013-empathy-ea82d4be5876f8adb5d958359019d76b65669841.tar.lz
gsoc2013-empathy-ea82d4be5876f8adb5d958359019d76b65669841.tar.xz
gsoc2013-empathy-ea82d4be5876f8adb5d958359019d76b65669841.tar.zst
gsoc2013-empathy-ea82d4be5876f8adb5d958359019d76b65669841.zip
No need to manually prepare the connection
tp-glib does it for us now, thanks to the EmpathyClientFactory.
Diffstat (limited to 'src')
-rw-r--r--src/empathy-accounts-dialog.c34
1 files changed, 9 insertions, 25 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index 488388c4f..d7b16edf2 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -660,29 +660,6 @@ account_dialog_got_self_contact (TpConnection *conn,
}
static void
-conn_prepared (GObject *src,
- GAsyncResult *result,
- gpointer user_data)
-{
- TpConnection *conn = TP_CONNECTION (src);
- EmpathyAccountsDialog *dialog = user_data;
- GError *error = NULL;
-
- if (!tp_proxy_prepare_finish (conn, result, &error))
- {
- DEBUG ("Failed to get self-contact: %s", error->message);
- account_dialog_show_contact_details_failed (dialog, TRUE);
- g_error_free (error);
- return;
- }
-
- empathy_tp_contact_factory_get_from_handle (conn,
- tp_connection_get_self_handle (conn),
- account_dialog_got_self_contact,
- NULL, NULL, G_OBJECT (dialog));
-}
-
-static void
account_dialog_create_dialog_content (EmpathyAccountsDialog *dialog,
EmpathyAccountSettings *settings)
{
@@ -709,9 +686,16 @@ account_dialog_create_dialog_content (EmpathyAccountsDialog *dialog,
conn = tp_account_get_connection (account);
if (conn != NULL)
- tp_proxy_prepare_async (conn, NULL, conn_prepared, dialog);
+ {
+ empathy_tp_contact_factory_get_from_handle (conn,
+ tp_connection_get_self_handle (conn),
+ account_dialog_got_self_contact,
+ NULL, NULL, G_OBJECT (dialog));
+ }
else
- account_dialog_show_contact_details_failed (dialog, FALSE);
+ {
+ account_dialog_show_contact_details_failed (dialog, FALSE);
+ }
bbox = gtk_hbutton_box_new ();
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), GTK_BUTTONBOX_END);