diff libpurple/conversation.c @ 31713:298685661f89

Add constant-time lookup of row in the userlist by way of PurpleConvChatBuddy ui_data Thanks to elb for pointing out GtkTreeRowReference. Unfortunately, pidgin_conv_chat_remove_users cannot benefit from this because the PCCB struct is destroyed prior to the uiop being called. Joining #pidgin and #ubuntu is now extremely quick.
author Paul Aurich <paul@darkrain42.org>
date Tue, 21 Jun 2011 04:35:04 +0000
parents f7c3aac5b22b
children dc69d22279e5
line wrap: on
line diff
--- a/libpurple/conversation.c	Tue Jun 21 03:34:50 2011 +0000
+++ b/libpurple/conversation.c	Tue Jun 21 04:35:04 2011 +0000
@@ -2185,6 +2185,9 @@
 	if (cb == NULL)
 		return;
 
+	purple_signal_emit(purple_conversations_get_handle(),
+			"deleting-chat-buddy", cb);
+
 	g_free(cb->alias);
 	g_free(cb->alias_key);
 	g_free(cb->name);
@@ -2591,6 +2594,11 @@
 						 purple_value_new(PURPLE_TYPE_STRING),
 						 purple_value_new(PURPLE_TYPE_STRING));
 
+	purple_signal_register(handle, "deleting-chat-buddy",
+						 purple_marshal_VOID__POINTER, NULL, 1,
+						 purple_value_new(PURPLE_TYPE_SUBTYPE,
+										PURPLE_SUBTYPE_CHATBUDDY));
+
 	purple_signal_register(handle, "chat-inviting-user",
 						 purple_marshal_VOID__POINTER_POINTER_POINTER, NULL, 3,
 						 purple_value_new(PURPLE_TYPE_SUBTYPE,