changeset 13069:42c62476b61b

[gaim-migrate @ 15431] SF User pomp pointed out that if you open a conversation window with an AIM buddy who is offline and hit Ctrl-O, you'll end up with an empty log. An error message shows in the conversation window, but such messages are not logged. This change logs error messages as well as logging any messages with a type we don't recognize (and files a debug message, since that shouldn't happen). committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Mon, 30 Jan 2006 04:51:12 +0000
parents 78fa9502715b
children 5a0f978674ad
files src/log.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/log.c	Mon Jan 30 04:46:01 2006 +0000
+++ b/src/log.c	Mon Jan 30 04:51:12 2006 +0000
@@ -961,6 +961,8 @@
 	} else {
 		if (type & GAIM_MESSAGE_SYSTEM)
 			written += fprintf(data->file, "<font size=\"2\">(%s)</font><b> %s</b><br/>\n", date, msg_fixed);
+		else if (type & GAIM_MESSAGE_ERROR)
+			written += fprintf(data->file, "<font color=\"#FF0000\"><font size=\"2\">(%s)</font><b> %s</b></font><br/>\n", date, msg_fixed);
 		else if (type & GAIM_MESSAGE_WHISPER)
 			written += fprintf(data->file, "<font color=\"#6C2585\"><font size=\"2\">(%s)</font><b> %s:</b></font> %s<br/>\n",
 					date, from, msg_fixed);
@@ -983,6 +985,10 @@
 			else
 				written += fprintf(data->file, "<font color=\"#16569E\"><font size=\"2\">(%s)</font> <b>%s:</b></font> %s<br/>\n",
 						date, from, msg_fixed);
+		} else {
+			gaim_debug_error("log", "Unhandled message type.");
+			written += fprintf(data->file, "<font size=\"2\">(%s)</font><b> %s:</b></font> %s<br/>\n",
+                        		date, from, msg_fixed);
 		}
 	}
 	g_free(date);