[empathy: 11/22] tp-chat: give ::pending-message-removed the message



commit 96345c97d9c3fc52b45ef5ce522ef2e4c94bca63
Author: Jonny Lamb <jonnylamb gnome org>
Date:   Fri May 13 11:35:09 2011 +0100

    tp-chat: give ::pending-message-removed the message
    
    Signed-off-by: Jonny Lamb <jonnylamb gnome org>

 libempathy-gtk/empathy-chat.c |    1 +
 libempathy/empathy-tp-chat.c  |    8 ++++----
 2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 019064a..71e5620 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -1293,6 +1293,7 @@ chat_message_received_cb (EmpathyTpChat  *tp_chat,
 
 static void
 chat_pending_message_removed_cb (EmpathyTpChat  *tp_chat,
+				 EmpathyMessage *message,
 				 EmpathyChat    *chat)
 {
 	EmpathyChatPriv *priv = GET_PRIV (chat);
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index c83db01..de15a96 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -479,10 +479,10 @@ pending_message_removed_cb (TpTextChannel   *channel,
 				 find_pending_message_func);
 	g_assert (m != NULL);
 
+	g_signal_emit (chat, signals[PENDING_MESSAGE_REMOVED], 0, m->data);
+
 	g_object_unref (m->data);
 	g_queue_delete_link (priv->pending_messages_queue, m);
-
-	g_signal_emit (chat, signals[PENDING_MESSAGE_REMOVED], 0);
 }
 
 static void
@@ -1672,9 +1672,9 @@ empathy_tp_chat_class_init (EmpathyTpChatClass *klass)
 			      G_SIGNAL_RUN_LAST,
 			      0,
 			      NULL, NULL,
-			      g_cclosure_marshal_VOID__VOID,
+			      g_cclosure_marshal_VOID__OBJECT,
 			      G_TYPE_NONE,
-			      0);
+			      1, EMPATHY_TYPE_MESSAGE);
 
 	g_type_class_add_private (object_class, sizeof (EmpathyTpChatPriv));
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]