diff options
author | Will Thompson <will.thompson@collabora.co.uk> | 2012-06-27 17:40:52 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-06-28 16:56:30 +0800 |
commit | 13a16f024f65bdfd899298d0278e0166ca781e7e (patch) | |
tree | 44b258d5f6d15bc7e5c15a38d8ff081362be1a40 /libempathy-gtk | |
parent | 36dc0639473930ac596bdbf08f6ea0a6a8471f7c (diff) | |
download | gsoc2013-empathy-13a16f024f65bdfd899298d0278e0166ca781e7e.tar gsoc2013-empathy-13a16f024f65bdfd899298d0278e0166ca781e7e.tar.gz gsoc2013-empathy-13a16f024f65bdfd899298d0278e0166ca781e7e.tar.bz2 gsoc2013-empathy-13a16f024f65bdfd899298d0278e0166ca781e7e.tar.lz gsoc2013-empathy-13a16f024f65bdfd899298d0278e0166ca781e7e.tar.xz gsoc2013-empathy-13a16f024f65bdfd899298d0278e0166ca781e7e.tar.zst gsoc2013-empathy-13a16f024f65bdfd899298d0278e0166ca781e7e.zip |
EmpathyChat: tell view to show/hide avatars based on connection interfaces
I believe that by the time we get here the EmpathyTpChat's TpConnection
should be prepared enough to know its interfaces? It seems to be in my
brief testing.
https://bugzilla.gnome.org/show_bug.cgi?id=627948
Diffstat (limited to 'libempathy-gtk')
-rw-r--r-- | libempathy-gtk/empathy-chat.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index fc2100ba7..e638bc394 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -3338,6 +3338,17 @@ chat_constructed (GObject *object) EmpathyChat *chat = EMPATHY_CHAT (object); EmpathyChatPriv *priv = GET_PRIV (chat); + if (priv->tp_chat != NULL) { + TpChannel *channel = TP_CHANNEL (priv->tp_chat); + TpConnection *conn = tp_channel_borrow_connection (channel); + gboolean supports_avatars = + tp_proxy_has_interface_by_id (conn, + TP_IFACE_QUARK_CONNECTION_INTERFACE_AVATARS); + + empathy_chat_view_set_show_avatars (chat->view, + supports_avatars); + } + if (priv->handle_type != TP_HANDLE_TYPE_ROOM) { /* First display logs from the logger and then display pending messages */ chat_add_logs (chat); |