soc.2012.gg: 720d0db0: Still making trunk usable again: correct...

tomkiewicz at cpw.pidgin.im tomkiewicz at cpw.pidgin.im
Sun May 20 15:10:46 EDT 2012


----------------------------------------------------------------------
Revision: 720d0db07edbddea10a65b20f03956e5f25033a6
Parent:   211260edfa4a35e09f575202bae0b5a626e43ac8
Author:   tomkiewicz at cpw.pidgin.im
Date:     05/20/12 15:08:37
Branch:   im.pidgin.soc.2012.gg
URL: http://d.pidgin.im/viewmtn/revision/info/720d0db07edbddea10a65b20f03956e5f25033a6

Changelog: 

Still making trunk usable again: correctly display plaintext logs

Changes against parent 211260edfa4a35e09f575202bae0b5a626e43ac8

  patched  pidgin/gtklog.c

-------------- next part --------------
============================================================
--- pidgin/gtklog.c	44a45ba9d6fd6476019345d45e77fc6969b0bdfd
+++ pidgin/gtklog.c	4530456763f35bd74ef821f12b1d52383675155e
@@ -465,6 +465,14 @@ static void log_select_cb(GtkTreeSelecti
 	webkit_web_view_open(WEBKIT_WEB_VIEW(viewer->web_view), "about:blank");
 
 	purple_signal_emit(pidgin_log_get_handle(), "log-displaying", viewer, log);
+	
+	/* plaintext log (html one starts with <html> tag) */
+	if (read[0] != '<')
+	{
+		char *newRead = purple_strreplace(read, "\n", "<br>");
+		g_free(read);
+		read = newRead;
+	}
 
 	webkit_web_view_load_html_string(WEBKIT_WEB_VIEW(viewer->web_view), read, "");
 	g_free(read);


More information about the Commits mailing list