changeset 32533:9839a31f2667

Well, chat is sorta kinda working.
author tdrhq@soc.pidgin.im
date Mon, 10 Aug 2009 01:21:57 +0000
parents 32d7d3c4163c
children 0bac73a6a536
files pidgin/plugins/adiumthemes/webkit.c
diffstat 1 files changed, 19 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/plugins/adiumthemes/webkit.c	Sun Aug 09 20:13:32 2009 +0000
+++ b/pidgin/plugins/adiumthemes/webkit.c	Mon Aug 10 01:21:57 2009 +0000
@@ -341,7 +341,8 @@
 	return FALSE;
 }
 
-static gboolean purple_webkit_displaying_im_msg (PurpleAccount *account,
+
+static gboolean webkit_on_displaying_im_msg (PurpleAccount *account,
 						 const char* name,
 						 char **pmessage,
 						 PurpleConversation *conv,
@@ -401,6 +402,16 @@
 	return TRUE; /* GtkConv should not handle this guy */
 }
 
+static gboolean webkit_on_displaying_chat_msg (PurpleAccount *account,
+					       const char *who,
+					       char **message,
+					       PurpleConversation *conv,
+					       PurpleMessageFlags flags,
+					       gpointer userdata)
+{
+	/* handle exactly like an IM message */
+	return webkit_on_displaying_im_msg (account, who, message, conv, flags, NULL);
+}
 
 static void
 webkit_on_converstation_displayed (PidginConversation *gtkconv, gpointer data)
@@ -554,10 +565,16 @@
 	purple_signal_connect (pidgin_conversations_get_handle (),
 			       "displaying-im-msg",
 			       webkit_plugin_get_handle (),
-			       PURPLE_CALLBACK(purple_webkit_displaying_im_msg),
+			       PURPLE_CALLBACK(webkit_on_displaying_im_msg),
 			       NULL);
 			    
 	purple_signal_connect (pidgin_conversations_get_handle (),
+			       "displaying-chat-msg",
+			       webkit_plugin_get_handle (),
+			       PURPLE_CALLBACK(webkit_on_displaying_chat_msg),
+			       NULL);
+
+	purple_signal_connect (pidgin_conversations_get_handle (),
 			       "conversation-displayed",
 			       webkit_plugin_get_handle (),
 			       PURPLE_CALLBACK(webkit_on_converstation_displayed),