pidgin/pidgin

Parents 2e99ae2e1aba
Children 8f578bc9129b
Still making trunk usable again: correctly display plaintext logs
--- a/pidgin/gtklog.c Sat May 19 16:38:38 2012 +0000
+++ b/pidgin/gtklog.c Sun May 20 19:08:37 2012 +0000
@@ -465,6 +465,14 @@
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);