changeset 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 46db943326fb
children 3f10bd32ef1c
files COPYRIGHT pidgin/gtkconv.c
diffstat 2 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/COPYRIGHT	Fri Feb 09 17:18:48 2007 +0000
+++ b/COPYRIGHT	Fri Feb 09 17:23:47 2007 +0000
@@ -245,6 +245,7 @@
 Havoc Pennington
 Ted Percival
 Eduardo Pérez
+Matt Perry
 Celso Pinto
 Joao Luís Marques Pinto
 Aleksander Piotrowski
--- 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(""));