changeset 13337:d4af79bc2d0a

[gaim-migrate @ 15707] Solve the timestamp plugin/history plugin interaction problem and remove trailing whitespace from the history before it's printed. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Mon, 27 Feb 2006 17:30:15 +0000
parents 999571d910ed
children 0f708ed02902
files plugins/history.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/history.c	Mon Feb 27 17:06:21 2006 +0000
+++ b/plugins/history.c	Mon Feb 27 17:30:15 2006 +0000
@@ -114,11 +114,15 @@
 	gtk_imhtml_set_protocol_name(GTK_IMHTML(gtkconv->imhtml),
 							      gaim_account_get_protocol_name(((GaimLog*)logs->data)->account));
 
+	if (gtk_text_buffer_get_char_count(gtk_text_view_get_buffer(GTK_TEXT_VIEW(gtkconv->imhtml))))
+		gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), "<BR>", options);
+
 	header = g_strdup_printf(_("<b>Conversation with %s on %s:</b><br>"), alias,
 							 gaim_date_format_full(localtime(&((GaimLog *)logs->data)->time)));
 	gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), header, options);
 	g_free(header);
 
+	g_strchomp(history);
 	gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), history, options);
 	g_free(history);