aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-accounts-dialog.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-05-03 17:30:49 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-05-03 17:35:22 +0800
commit5deac54272ed93cf9811af2dc79658b21bb8c705 (patch)
tree9cb5dbc396abca99e93c669273918ac78a8de941 /src/empathy-accounts-dialog.c
parente73848da5a3c8c3ab71aab36c0fbb9d7f20141d7 (diff)
downloadgsoc2013-empathy-5deac54272ed93cf9811af2dc79658b21bb8c705.tar
gsoc2013-empathy-5deac54272ed93cf9811af2dc79658b21bb8c705.tar.gz
gsoc2013-empathy-5deac54272ed93cf9811af2dc79658b21bb8c705.tar.bz2
gsoc2013-empathy-5deac54272ed93cf9811af2dc79658b21bb8c705.tar.lz
gsoc2013-empathy-5deac54272ed93cf9811af2dc79658b21bb8c705.tar.xz
gsoc2013-empathy-5deac54272ed93cf9811af2dc79658b21bb8c705.tar.zst
gsoc2013-empathy-5deac54272ed93cf9811af2dc79658b21bb8c705.zip
accounts-dialog: stop using tp_connection_get_self_handle()
https://bugzilla.gnome.org/show_bug.cgi?id=675229
Diffstat (limited to 'src/empathy-accounts-dialog.c')
-rw-r--r--src/empathy-accounts-dialog.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/src/empathy-accounts-dialog.c b/src/empathy-accounts-dialog.c
index af85fd64f..a0d101c38 100644
--- a/src/empathy-accounts-dialog.c
+++ b/src/empathy-accounts-dialog.c
@@ -787,22 +787,15 @@ account_dialog_show_contact_details_failed (EmpathyAccountsDialog *dialog,
}
static void
-account_dialog_got_self_contact (TpConnection *conn,
- EmpathyContact *contact,
- const GError *in_error,
- gpointer user_data,
- GObject *dialog)
+create_contact_info_editor (EmpathyAccountsDialog *self,
+ TpConnection *conn)
{
- EmpathyAccountsDialogPriv *priv = GET_PRIV (dialog);
+ EmpathyAccountsDialogPriv *priv = GET_PRIV (self);
GtkWidget *editor, *alig;
+ EmpathyContact *contact;
- if (in_error != NULL)
- {
- DEBUG ("Failed to get self-contact: %s", in_error->message);
- account_dialog_show_contact_details_failed (
- EMPATHY_ACCOUNTS_DIALOG (dialog), TRUE);
- return;
- }
+ contact = empathy_contact_dup_from_tp_contact (
+ tp_connection_get_self_contact (conn));
alig = gtk_alignment_new (0.5, 0, 1, 1);
@@ -818,6 +811,7 @@ account_dialog_got_self_contact (TpConnection *conn,
gtk_container_add (GTK_CONTAINER (alig), editor);
gtk_widget_show (alig);
gtk_widget_show (editor);
+ g_object_unref (contact);
}
static void
@@ -848,10 +842,7 @@ account_dialog_create_dialog_content (EmpathyAccountsDialog *dialog,
if (conn != NULL &&
tp_proxy_get_invalidated (conn) == NULL)
{
- empathy_tp_contact_factory_get_from_handle (conn,
- tp_connection_get_self_handle (conn),
- account_dialog_got_self_contact,
- NULL, NULL, G_OBJECT (dialog));
+ create_contact_info_editor (dialog, conn);
}
else
{