]> git.0d.be Git - empathy.git/commitdiff
use tp_text_channel_ack_all_pending_messages_async()
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 11 Jul 2011 14:02:08 +0000 (16:02 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 11 Jul 2011 14:05:58 +0000 (16:05 +0200)
libempathy-gtk/empathy-chat.c
libempathy/empathy-tp-chat.c
libempathy/empathy-tp-chat.h

index 69d81f99372c301ed9810de69df0685517712c00..239be0b1f9af7a5955d8cdbf44b4b6bdd71f79cf 100644 (file)
@@ -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) {
index 18539d3e02db06028b1ac49356d17362378a4a41..a690f60e3463f8a0a5e1a0f17c0cc30c468fbea0 100644 (file)
@@ -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:
  *
index 0b28312b9ad7fff4d30053352942024ccd028ad1..a69c4924f2b81aa026bc25ef18ec148f2e16d0a2 100644 (file)
@@ -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);