aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-07-11 22:02:08 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-07-11 22:05:58 +0800
commiteb2ef7bb98d193402e372efba43a7212d8e5127c (patch)
tree06ad1b7a534ca5e2d4ed9c478091673f06bd5883
parent4644a9d69f070df504925902e7692fa1bc731dfa (diff)
downloadgsoc2013-empathy-eb2ef7bb98d193402e372efba43a7212d8e5127c.tar
gsoc2013-empathy-eb2ef7bb98d193402e372efba43a7212d8e5127c.tar.gz
gsoc2013-empathy-eb2ef7bb98d193402e372efba43a7212d8e5127c.tar.bz2
gsoc2013-empathy-eb2ef7bb98d193402e372efba43a7212d8e5127c.tar.lz
gsoc2013-empathy-eb2ef7bb98d193402e372efba43a7212d8e5127c.tar.xz
gsoc2013-empathy-eb2ef7bb98d193402e372efba43a7212d8e5127c.tar.zst
gsoc2013-empathy-eb2ef7bb98d193402e372efba43a7212d8e5127c.zip
use tp_text_channel_ack_all_pending_messages_async()
-rw-r--r--libempathy-gtk/empathy-chat.c3
-rw-r--r--libempathy/empathy-tp-chat.c35
-rw-r--r--libempathy/empathy-tp-chat.h3
3 files changed, 2 insertions, 39 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 69d81f993..239be0b1f 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -4027,7 +4027,8 @@ empathy_chat_messages_read (EmpathyChat *self)
return;
if (priv->tp_chat != NULL) {
- empathy_tp_chat_acknowledge_all_messages (priv->tp_chat);
+ tp_text_channel_ack_all_pending_messages_async (
+ TP_TEXT_CHANNEL (priv->tp_chat), NULL, NULL);
}
if (priv->unread_messages_when_offline > 0) {
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 18539d3e0..a690f60e3 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -1496,41 +1496,6 @@ empathy_tp_chat_acknowledge_message (EmpathyTpChat *self,
tp_msg, NULL, NULL);
}
-void
-empathy_tp_chat_acknowledge_messages (EmpathyTpChat *self,
- const GSList *messages) {
- const GSList *l;
- GList *messages_to_ack = NULL;
-
- g_return_if_fail (EMPATHY_IS_TP_CHAT (self));
-
- if (messages == NULL)
- return;
-
- for (l = messages; l != NULL; l = g_slist_next (l)) {
- EmpathyMessage *message = EMPATHY_MESSAGE (l->data);
-
- if (empathy_message_is_incoming (message)) {
- TpMessage *tp_msg = empathy_message_get_tp_message (message);
- messages_to_ack = g_list_append (messages_to_ack, tp_msg);
- }
- }
-
- if (messages_to_ack != NULL) {
- tp_text_channel_ack_messages_async (TP_TEXT_CHANNEL (self),
- messages_to_ack, NULL, NULL);
- }
-
- g_list_free (messages_to_ack);
-}
-
-void
-empathy_tp_chat_acknowledge_all_messages (EmpathyTpChat *self)
-{
- empathy_tp_chat_acknowledge_messages (self,
- (GSList *) empathy_tp_chat_get_pending_messages (self));
-}
-
/**
* empathy_tp_chat_can_add_contact:
*
diff --git a/libempathy/empathy-tp-chat.h b/libempathy/empathy-tp-chat.h
index 0b28312b9..a69c4924f 100644
--- a/libempathy/empathy-tp-chat.h
+++ b/libempathy/empathy-tp-chat.h
@@ -93,9 +93,6 @@ GPtrArray * empathy_tp_chat_get_properties (EmpathyTpChat *chat);
const GList * empathy_tp_chat_get_pending_messages (EmpathyTpChat *chat);
void empathy_tp_chat_acknowledge_message (EmpathyTpChat *chat,
EmpathyMessage *message);
-void empathy_tp_chat_acknowledge_messages (EmpathyTpChat *chat,
- const GSList *messages);
-void empathy_tp_chat_acknowledge_all_messages (EmpathyTpChat *chat);
gboolean empathy_tp_chat_can_add_contact (EmpathyTpChat *self);