static void chat_composing_stop (GossipChat *chat);
static void chat_composing_remove_timeout (GossipChat *chat);
static gboolean chat_composing_stop_timeout_cb (GossipChat *chat);
+static void chat_state_changed_cb (EmpathyTpChat *tp_chat,
+ GossipContact *contact,
+ TelepathyChannelChatState state,
+ GossipChat *chat);
enum {
COMPOSING,
/* Just restart the timeout */
chat_composing_remove_timeout (chat);
} else {
- /* FIXME:
- gossip_session_send_composing (gossip_app_get_session (),
- priv->contact, TRUE);
- */
+ empathy_tp_chat_set_state (priv->tp_chat,
+ TP_CHANNEL_CHAT_STATE_COMPOSING);
}
priv->composing_stop_timeout_id = g_timeout_add (
priv = GET_PRIV (chat);
chat_composing_remove_timeout (chat);
- /* FIXME:
- gossip_session_send_composing (gossip_app_get_session (),
- priv->contact, FALSE);*/
+ empathy_tp_chat_set_state (priv->tp_chat,
+ TP_CHANNEL_CHAT_STATE_ACTIVE);
}
static void
priv = GET_PRIV (chat);
priv->composing_stop_timeout_id = 0;
- /* FIXME:
- gossip_session_send_composing (gossip_app_get_session (),
- priv->contact, FALSE);*/
+ empathy_tp_chat_set_state (priv->tp_chat,
+ TP_CHANNEL_CHAT_STATE_PAUSED);
return FALSE;
}
+static void
+chat_state_changed_cb (EmpathyTpChat *tp_chat,
+ GossipContact *contact,
+ TelepathyChannelChatState state,
+ GossipChat *chat)
+{
+ /* FIXME: not yet implemented */
+}
+
gboolean
gossip_chat_get_is_command (const gchar *str)
{
return NULL;
}
-GdkPixbuf *
-gossip_chat_get_status_pixbuf (GossipChat *chat)
+const gchar *
+gossip_chat_get_status_icon_name (GossipChat *chat)
{
g_return_val_if_fail (GOSSIP_IS_CHAT (chat), NULL);
- if (GOSSIP_CHAT_GET_CLASS (chat)->get_status_pixbuf) {
- return GOSSIP_CHAT_GET_CLASS (chat)->get_status_pixbuf (chat);
+ if (GOSSIP_CHAT_GET_CLASS (chat)->get_status_icon_name) {
+ return GOSSIP_CHAT_GET_CLASS (chat)->get_status_icon_name (chat);
}
return NULL;
g_signal_connect (tp_chat, "message-received",
G_CALLBACK (chat_message_received_cb),
chat);
+ g_signal_connect (tp_chat, "chat-state-changed",
+ G_CALLBACK (chat_state_changed_cb),
+ chat);
g_signal_connect (tp_chat, "destroy",
G_CALLBACK (chat_destroy_cb),
chat);