From 1ce485c6faa15f624dcc79b3260bf3a9899b5cee Mon Sep 17 00:00:00 2001 From: mathieui Date: Mon, 7 Apr 2014 01:25:30 +0200 Subject: Fix #2354 (logs are badly colored with xhtml history) - now it should work properly - add a COLOR_LOG_MSG theming option, used both for local and remote history --- src/text_buffer.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/text_buffer.py') diff --git a/src/text_buffer.py b/src/text_buffer.py index b2915a61..71820b2f 100644 --- a/src/text_buffer.py +++ b/src/text_buffer.py @@ -16,7 +16,7 @@ import collections from datetime import datetime from config import config -from theming import get_theme +from theming import get_theme, dump_tuple message_fields = 'txt nick_color time str_time nickname user identifier highlight me old_message revisions jid' Message = collections.namedtuple('Message', message_fields) @@ -77,6 +77,8 @@ class TextBuffer(object): if txt.startswith('/me '): me = True txt = '\x19%(info_col)s}' % {'info_col': get_theme().COLOR_ME_MESSAGE[0]} + txt[4:] + if history: + txt = txt.replace('\x19o', '\x19o\x19%s}' % dump_tuple(get_theme().COLOR_LOG_MSG)) msg = Message( txt='%s\x19o'%(txt.replace('\t', ' '),), nick_color=nick_color, -- cgit v1.2.3