aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-chat.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2007-07-01 05:12:20 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-07-01 05:12:20 +0800
commit63bc73ed30d97c8ecfb1be4bc19c3e30e9aaddf2 (patch)
tree569b475dff544ef4e2b6f75ac86dc196f600167a /libempathy-gtk/empathy-chat.c
parent7746736afa656f880933e3f5a9effaba490be65a (diff)
downloadgsoc2013-empathy-63bc73ed30d97c8ecfb1be4bc19c3e30e9aaddf2.tar
gsoc2013-empathy-63bc73ed30d97c8ecfb1be4bc19c3e30e9aaddf2.tar.gz
gsoc2013-empathy-63bc73ed30d97c8ecfb1be4bc19c3e30e9aaddf2.tar.bz2
gsoc2013-empathy-63bc73ed30d97c8ecfb1be4bc19c3e30e9aaddf2.tar.lz
gsoc2013-empathy-63bc73ed30d97c8ecfb1be4bc19c3e30e9aaddf2.tar.xz
gsoc2013-empathy-63bc73ed30d97c8ecfb1be4bc19c3e30e9aaddf2.tar.zst
gsoc2013-empathy-63bc73ed30d97c8ecfb1be4bc19c3e30e9aaddf2.zip
Fix a leaked ref.
2007-06-30 Xavier Claessens <xclaesse@gmail.com> * libempathy-gtk/empathy-account-widget-generic.c: Fix a leaked ref. * src/empathy.c: If we get a chatroom we have to create an EmpathyTpChatroom object. * src/Makefile.am: Fix build system, programs links to libempathy-gtk and libempathy. * configure.ac: libempathy does not depends on libgnome-vfs. * libempathy-gtk/empathy-status-icon.c: * libempathy-gtk/empathy-chat.c: * libempathy/empathy-tp-chat.c: * libempathy/empathy-tp-chat.h: * libempathy/empathy-filter.c: * libempathy/empathy-filter.h: * libempathy/empathy-filter.xml: * libempathy/Makefile.am: Filter incoming text channels and make status icon flash when there we receive a new message. Dispatch the channel only when we get a message and the user click on the icon. svn path=/trunk/; revision=175
Diffstat (limited to 'libempathy-gtk/empathy-chat.c')
-rw-r--r--libempathy-gtk/empathy-chat.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 0000e5d5a..8f6ca3705 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -392,7 +392,7 @@ chat_input_text_view_send (EmpathyChat *chat)
}
static void
-chat_message_received_cb (EmpathyTpChat *tp_chat,
+chat_message_received_cb (EmpathyTpChat *tp_chat,
EmpathyMessage *message,
EmpathyChat *chat)
{
@@ -1288,10 +1288,11 @@ empathy_chat_load_geometry (EmpathyChat *chat,
}
void
-empathy_chat_set_tp_chat (EmpathyChat *chat,
- EmpathyTpChat *tp_chat)
+empathy_chat_set_tp_chat (EmpathyChat *chat,
+ EmpathyTpChat *tp_chat)
{
EmpathyChatPriv *priv;
+ GList *messages, *l;
g_return_if_fail (EMPATHY_IS_CHAT (chat));
g_return_if_fail (EMPATHY_IS_TP_CHAT (tp_chat));
@@ -1332,7 +1333,14 @@ empathy_chat_set_tp_chat (EmpathyChat *chat,
G_CALLBACK (chat_destroy_cb),
chat);
- empathy_tp_chat_request_pending (tp_chat);
+ /* Get pending messages */
+ empathy_tp_chat_set_acknowledge (tp_chat, TRUE);
+ messages = empathy_tp_chat_get_pendings (tp_chat);
+ for (l = messages; l; l = l->next) {
+ chat_message_received_cb (tp_chat, l->data, chat);
+ g_object_unref (l->data);
+ }
+ g_list_free (messages);
if (!priv->sensitive) {
gtk_widget_set_sensitive (chat->input_text_view, TRUE);