/pidgin/main: a30c853356eb: gtkconv: don't smileify system messages

Jakub Adam jakub.adam at ktknet.cz
Tue May 24 20:09:14 EDT 2016


Changeset: a30c853356eb1e1348c5ae9a376316e38e4411bd
Author:	 Jakub Adam <jakub.adam at ktknet.cz>
Date:	 2016-05-12 14:26 +0200
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/a30c853356eb

Description:

gtkconv: don't smileify system messages

Avoids char sequences in notifications like 'sip:Peter.Doe at company.com
has entered the room' being replaced by smile icons when displayed in
the conversation window.

diffstat:

 pidgin/gtkconv.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (20 lines):

diff --git a/pidgin/gtkconv.c b/pidgin/gtkconv.c
--- a/pidgin/gtkconv.c
+++ b/pidgin/gtkconv.c
@@ -6760,9 +6760,13 @@ pidgin_conv_write_conv(PurpleConversatio
 	gtkconv->last_flags = flags;
 	gtkconv->last_conversed = conv;
 
-	smileyed = purple_smiley_parser_smileify(conv, displaying,
-		(flags & PURPLE_MESSAGE_RECV), pidgin_conv_write_smiley,
-		(gpointer)purple_account_get_protocol_name(account));
+	if(purple_message_get_flags(pmsg) & PURPLE_MESSAGE_SYSTEM) {
+		smileyed = g_strdup(displaying);
+	} else {
+		smileyed = purple_smiley_parser_smileify(conv, displaying,
+			(flags & PURPLE_MESSAGE_RECV), pidgin_conv_write_smiley,
+			(gpointer)purple_account_get_protocol_name(account));
+	}
 	imgized = box_remote_images(conv, smileyed);
 	msg_tokenized = replace_message_tokens(message_html, conv,
 		purple_message_get_author(pmsg),



More information about the Commits mailing list