diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-02-11 21:53:50 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2011-05-25 15:22:41 +0800 |
commit | 0dd8e6cbd7b903d2ce8b56995e4b4ac6ed042f2c (patch) | |
tree | 22d694d8dce6c66151362c1301e3fa9a6291ff9a /libempathy-gtk/empathy-chat.c | |
parent | 4e39c2c5adac55793143c110159fa40cc51f324c (diff) | |
download | gsoc2013-empathy-0dd8e6cbd7b903d2ce8b56995e4b4ac6ed042f2c.tar gsoc2013-empathy-0dd8e6cbd7b903d2ce8b56995e4b4ac6ed042f2c.tar.gz gsoc2013-empathy-0dd8e6cbd7b903d2ce8b56995e4b4ac6ed042f2c.tar.bz2 gsoc2013-empathy-0dd8e6cbd7b903d2ce8b56995e4b4ac6ed042f2c.tar.lz gsoc2013-empathy-0dd8e6cbd7b903d2ce8b56995e4b4ac6ed042f2c.tar.xz gsoc2013-empathy-0dd8e6cbd7b903d2ce8b56995e4b4ac6ed042f2c.tar.zst gsoc2013-empathy-0dd8e6cbd7b903d2ce8b56995e4b4ac6ed042f2c.zip |
EmpathyTpChat: inherit from TpTextChannel (#650554)
Diffstat (limited to 'libempathy-gtk/empathy-chat.c')
-rw-r--r-- | libempathy-gtk/empathy-chat.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c index 5e1124cdc..ef4d7a53d 100644 --- a/libempathy-gtk/empathy-chat.c +++ b/libempathy-gtk/empathy-chat.c @@ -709,10 +709,8 @@ static gboolean part_command_supported (EmpathyChat *chat) { EmpathyChatPriv * priv = GET_PRIV (chat); - TpChannel *channel; - channel = empathy_tp_chat_get_channel (priv->tp_chat); - return tp_proxy_has_interface_by_id (channel, + return tp_proxy_has_interface_by_id (priv->tp_chat, TP_IFACE_QUARK_CHANNEL_INTERFACE_GROUP); } @@ -866,14 +864,11 @@ chat_command_me (EmpathyChat *chat, { EmpathyChatPriv *priv = GET_PRIV (chat); TpMessage *message; - TpChannel *channel; + TpTextChannel *channel; - channel = empathy_tp_chat_get_channel (priv->tp_chat); + channel = (TpTextChannel *) (priv->tp_chat); - /* Strictly speaking we don't depend yet on Messages so best to check that - * the channel is actually a TpTextChannel before casting it. */ - if (TP_IS_TEXT_CHANNEL (channel) && - !tp_text_channel_supports_message_type (TP_TEXT_CHANNEL (channel), + if (!tp_text_channel_supports_message_type (channel, TP_CHANNEL_TEXT_MESSAGE_TYPE_ACTION)) { /* Action message are not supported, 'simulate' the action */ EmpathyContact *self_contact; @@ -2600,10 +2595,7 @@ chat_remote_contact_changed_cb (EmpathyChat *chat) priv->handle_type = TP_HANDLE_TYPE_CONTACT; } else if (priv->tp_chat != NULL) { - TpChannel *channel; - - channel = empathy_tp_chat_get_channel (priv->tp_chat); - g_object_get (channel, "handle-type", &priv->handle_type, NULL); + tp_channel_get_handle ((TpChannel *) priv->tp_chat, &priv->handle_type); } chat_update_contacts_visibility (chat, priv->show_contacts); @@ -3540,7 +3532,7 @@ display_password_info_bar (EmpathyChat *self) TRUE, TRUE, 3); gtk_widget_show_all (hbox); - tp_g_signal_connect_object (empathy_tp_chat_get_channel (priv->tp_chat), + tp_g_signal_connect_object (priv->tp_chat, "invalidated", G_CALLBACK (chat_invalidated_cb), info_bar, 0); |