pidgin: 6766246c: This should fix the everyone-is-the-same...

qulogic at pidgin.im qulogic at pidgin.im
Tue Jan 3 04:41:20 EST 2012


----------------------------------------------------------------------
Revision: 6766246c96469cc9e6799c64e7da00ab9dbd5b7e
Parent:   53aa3f79eb4c3631876d9a54933658b3b5bac9ec
Author:   dvpdiner2 at gmail.com
Date:     01/02/12 01:53:19
Branch:   im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/6766246c96469cc9e6799c64e7da00ab9dbd5b7e

Changelog: 

This should fix the everyone-is-the-same problem in chats.

Changes against parent 53aa3f79eb4c3631876d9a54933658b3b5bac9ec

  patched  pidgin/gtkconv.c

-------------- next part --------------
============================================================
--- pidgin/gtkconv.c	fa1fa7e231f83163b59618783372810ccb4f94c3
+++ pidgin/gtkconv.c	80062a5fb51c8ecd1b74ca4b4a188448ff3afece
@@ -6286,8 +6286,16 @@ pidgin_conv_write_conv(PurpleConversatio
 	} else if (flags & PURPLE_MESSAGE_SEND) {
 		message_html = pidgin_conversation_theme_get_template(gtkconv->theme, PIDGIN_CONVERSATION_THEME_TEMPLATE_OUTGOING_CONTENT);
 	} else if ((flags & PURPLE_MESSAGE_RECV) && (old_flags & PURPLE_MESSAGE_RECV)) {
-		message_html = pidgin_conversation_theme_get_template(gtkconv->theme, PIDGIN_CONVERSATION_THEME_TEMPLATE_INCOMING_NEXT_CONTENT);
-		func = "appendNextMessage";
+		GList *history = purple_conversation_get_message_history(conv);
+		PurpleConvMessage *last_msg = (PurpleConvMessage *)history->data;
+
+		/* If the senders are the same, use appendNextMessage */
+		if (purple_strequal(purple_conversation_message_get_sender(last_msg), name)) {
+			message_html = pidgin_conversation_theme_get_template(gtkconv->theme, PIDGIN_CONVERSATION_THEME_TEMPLATE_INCOMING_NEXT_CONTENT);
+			func = "appendNextMessage";
+		} else {
+			message_html = pidgin_conversation_theme_get_template(gtkconv->theme, PIDGIN_CONVERSATION_THEME_TEMPLATE_INCOMING_CONTENT);
+		}
 	} else if (flags & PURPLE_MESSAGE_RECV) {
 		message_html = pidgin_conversation_theme_get_template(gtkconv->theme, PIDGIN_CONVERSATION_THEME_TEMPLATE_INCOMING_CONTENT);
 	} else {


More information about the Commits mailing list