[empathy] contact: compare TpContact objects rather than handles
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] contact: compare TpContact objects rather than handles
- Date: Thu, 3 May 2012 09:47:36 +0000 (UTC)
commit 51bea3323498986ac13df3d99157c2b8db83484a
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Thu May 3 11:21:11 2012 +0200
contact: compare TpContact objects rather than handles
https://bugzilla.gnome.org/show_bug.cgi?id=675229
libempathy/empathy-contact.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c
index 704a64f..b741210 100644
--- a/libempathy/empathy-contact.c
+++ b/libempathy/empathy-contact.c
@@ -229,8 +229,7 @@ contact_constructed (GObject *object)
EmpathyContact *contact = (EmpathyContact *) object;
EmpathyContactPriv *priv = GET_PRIV (contact);
GHashTable *location;
- TpHandle self_handle;
- TpHandle handle;
+ TpContact *self_contact;
const gchar * const *client_types;
if (priv->tp_contact == NULL)
@@ -254,10 +253,9 @@ contact_constructed (GObject *object)
/* Set is-user property. Note that it could still be the handle is
* different from the connection's self handle, in the case the handle
* comes from a group interface. */
- self_handle = tp_connection_get_self_handle (
+ self_contact = tp_connection_get_self_contact (
tp_contact_get_connection (priv->tp_contact));
- handle = tp_contact_get_handle (priv->tp_contact);
- empathy_contact_set_is_user (contact, self_handle == handle);
+ empathy_contact_set_is_user (contact, self_contact == priv->tp_contact);
g_signal_connect (priv->tp_contact, "notify",
G_CALLBACK (tp_contact_notify_cb), contact);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]