diff plugins/history.c @ 11814:fa17fc619f17

[gaim-migrate @ 14105] Fix the display of smilies in text added to the imhtml by the history plugin. Fixes part of SF Bug #1298455. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Tue, 25 Oct 2005 13:29:28 +0000
parents f36471a3c258
children bc45ab9756b5
line wrap: on
line diff
--- a/plugins/history.c	Tue Oct 25 07:02:50 2005 +0000
+++ b/plugins/history.c	Tue Oct 25 13:29:28 2005 +0000
@@ -43,6 +43,7 @@
 	time_t tm;
 	char day[64];
 	char *header;
+	char *protocol;
 
 	convtype = gaim_conversation_get_type(c);
 	gtkconv = GAIM_GTK_CONVERSATION(c);
@@ -111,6 +112,10 @@
 	if (flags & GAIM_LOG_READ_NO_NEWLINE)
 		options |= GTK_IMHTML_NO_NEWLINE;
 
+	protocol = g_strdup(gtk_imhtml_get_protocol_name(GTK_IMHTML(gtkconv->imhtml)));
+	gtk_imhtml_set_protocol_name(GTK_IMHTML(gtkconv->imhtml),
+							      gaim_account_get_protocol_name(((GaimLog*)logs->data)->account));
+
 	tm = ((GaimLog *)logs->data)->time;
 	gaim_strftime(day, sizeof(day), "%c", localtime(&tm));
 	header = g_strdup_printf("<b>Conversation with %s on %s:</b><br>", alias, day);
@@ -122,6 +127,9 @@
 
 	gtk_imhtml_append_text(GTK_IMHTML(gtkconv->imhtml), "<hr>", options);
 
+	gtk_imhtml_set_protocol_name(GTK_IMHTML(gtkconv->imhtml), protocol);
+	g_free(protocol);
+
 	g_object_ref(G_OBJECT(gtkconv->imhtml));
 	g_idle_add(_scroll_imhtml_to_end, gtkconv->imhtml);