diff pidgin/gtkconv.c @ 15602:b03021cef5cb

SF Patch #1653845 from Matt Perry "Consider what happens when you call gaim_conversation_write with flags = GAIM_MESSAGE_RAW|GAIM_MESSAGE_NO_LOG; Intuitively, one would expect a raw message (no formatting when displayed), that is not written to the logs. However, in gaim_gtkconv_write_conv, NO_LOG is checked first and takes priority, adding additional formatting. This patch simply changes the order of the checks, so that RAW is checked first and has priority over all other message types."
author Richard Laager <rlaager@wiktel.com>
date Fri, 09 Feb 2007 17:23:47 +0000
parents 74b945e7609c
children b6f9f5331a82
line wrap: on
line diff
--- a/pidgin/gtkconv.c	Fri Feb 09 17:18:48 2007 +0000
+++ b/pidgin/gtkconv.c	Fri Feb 09 17:23:47 2007 +0000
@@ -4932,7 +4932,9 @@
 
 
 	/* TODO: These colors should not be hardcoded so log.c can use them */
-	if (flags & GAIM_MESSAGE_SYSTEM) {
+	if (flags & GAIM_MESSAGE_RAW) {
+		gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), message, gtk_font_options_all);
+	} else if (flags & GAIM_MESSAGE_SYSTEM) {
 		g_snprintf(buf2, sizeof(buf2),
 			   "<FONT %s><FONT SIZE=\"2\"><!--(%s) --></FONT><B>%s</B></FONT>",
 			   sml_attrib ? sml_attrib : "", mdate, displaying);
@@ -4952,8 +4954,6 @@
 			   sml_attrib ? sml_attrib : "", displaying);
 
 		gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), buf2, gtk_font_options_all);
-	} else if (flags & GAIM_MESSAGE_RAW) {
-		gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), displaying, gtk_font_options_all);
 	} else {
 		char *new_message = g_memdup(displaying, length);
 		char *alias_escaped = (alias ? g_markup_escape_text(alias, strlen(alias)) : g_strdup(""));