aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2007-05-09 04:08:17 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-05-09 04:08:17 +0800
commitae195f5e93d0f92e0c7714b5b27be8d1740803aa (patch)
tree8db450d3c71386accb1948deb8727fb71fd56973 /libempathy-gtk
parentf0f2ad9e9994d43ec6cbae068036e6dd6b76dea6 (diff)
downloadgsoc2013-empathy-ae195f5e93d0f92e0c7714b5b27be8d1740803aa.tar
gsoc2013-empathy-ae195f5e93d0f92e0c7714b5b27be8d1740803aa.tar.gz
gsoc2013-empathy-ae195f5e93d0f92e0c7714b5b27be8d1740803aa.tar.bz2
gsoc2013-empathy-ae195f5e93d0f92e0c7714b5b27be8d1740803aa.tar.lz
gsoc2013-empathy-ae195f5e93d0f92e0c7714b5b27be8d1740803aa.tar.xz
gsoc2013-empathy-ae195f5e93d0f92e0c7714b5b27be8d1740803aa.tar.zst
gsoc2013-empathy-ae195f5e93d0f92e0c7714b5b27be8d1740803aa.zip
[darcs-to-svn @ many changes]
svn path=/trunk/; revision=35
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/Makefile.am2
-rw-r--r--libempathy-gtk/gossip-chat.c32
-rw-r--r--libempathy-gtk/gossip-private-chat.c2
3 files changed, 24 insertions, 12 deletions
diff --git a/libempathy-gtk/Makefile.am b/libempathy-gtk/Makefile.am
index c5b66b744..b18845a17 100644
--- a/libempathy-gtk/Makefile.am
+++ b/libempathy-gtk/Makefile.am
@@ -1,4 +1,6 @@
AM_CPPFLAGS = \
+ -I. \
+ -I$(top_srcdir) \
$(EMPATHY_CFLAGS) \
$(WARN_CFLAGS)
diff --git a/libempathy-gtk/gossip-chat.c b/libempathy-gtk/gossip-chat.c
index e8906dbdd..706dca210 100644
--- a/libempathy-gtk/gossip-chat.c
+++ b/libempathy-gtk/gossip-chat.c
@@ -133,6 +133,10 @@ static void chat_composing_start (GossipChat *chat
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,
@@ -954,10 +958,8 @@ chat_composing_start (GossipChat *chat)
/* 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 (
@@ -974,9 +976,8 @@ chat_composing_stop (GossipChat *chat)
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
@@ -1000,13 +1001,21 @@ chat_composing_stop_timeout_cb (GossipChat *chat)
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_ACTIVE);
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)
{
@@ -1219,6 +1228,9 @@ gossip_chat_set_tp_chat (GossipChat *chat,
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);
diff --git a/libempathy-gtk/gossip-private-chat.c b/libempathy-gtk/gossip-private-chat.c
index a3bdbb6be..0c27abf26 100644
--- a/libempathy-gtk/gossip-private-chat.c
+++ b/libempathy-gtk/gossip-private-chat.c
@@ -49,8 +49,6 @@
#define DEBUG_DOMAIN "PrivateChat"
-#define COMPOSING_STOP_TIMEOUT 5
-
#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_PRIVATE_CHAT, GossipPrivateChatPriv))
struct _GossipPrivateChatPriv {