[empathy: 5/22] tp-chat: add pending-message-removed signal



commit 7412b7e93ee7106dc139365fb391e2f613c294ef
Author: Jonny Lamb <jonnylamb gnome org>
Date:   Thu May 12 16:24:43 2011 +0100

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

 libempathy/empathy-tp-chat.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
---
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 3d22bc1..c83db01 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -84,6 +84,7 @@ enum {
 	CHAT_STATE_CHANGED,
 	PROPERTY_CHANGED,
 	DESTROY,
+	PENDING_MESSAGE_REMOVED,
 	LAST_SIGNAL
 };
 
@@ -480,6 +481,8 @@ pending_message_removed_cb (TpTextChannel   *channel,
 
 	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
@@ -1663,6 +1666,16 @@ empathy_tp_chat_class_init (EmpathyTpChatClass *klass)
 			      G_TYPE_NONE,
 			      0);
 
+	signals[PENDING_MESSAGE_REMOVED] =
+		g_signal_new ("pending-message-removed",
+			      G_TYPE_FROM_CLASS (klass),
+			      G_SIGNAL_RUN_LAST,
+			      0,
+			      NULL, NULL,
+			      g_cclosure_marshal_VOID__VOID,
+			      G_TYPE_NONE,
+			      0);
+
 	g_type_class_add_private (object_class, sizeof (EmpathyTpChatPriv));
 }
 



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