Mercurial > pidgin
changeset 32779:f124ad0022ce
Still making trunk usable again: correctly display plaintext logs
author | tomkiewicz@cpw.pidgin.im |
---|---|
date | Sun, 20 May 2012 19:08:37 +0000 |
parents | 1c0d9e817dcc |
children | b37309823450 |
files | pidgin/gtklog.c |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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);