summaryrefslogtreecommitdiff
path: root/src/text_buffer.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-04-07 01:25:30 +0200
committermathieui <mathieui@mathieui.net>2014-04-07 01:25:30 +0200
commit1ce485c6faa15f624dcc79b3260bf3a9899b5cee (patch)
tree2e2da40dab7babf528853b3d0fd92ef4485abb8c /src/text_buffer.py
parent53040305ce97bd532bd27cf0c2f626136f34a572 (diff)
downloadpoezio-1ce485c6faa15f624dcc79b3260bf3a9899b5cee.tar.gz
poezio-1ce485c6faa15f624dcc79b3260bf3a9899b5cee.tar.bz2
poezio-1ce485c6faa15f624dcc79b3260bf3a9899b5cee.tar.xz
poezio-1ce485c6faa15f624dcc79b3260bf3a9899b5cee.zip
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
Diffstat (limited to 'src/text_buffer.py')
-rw-r--r--src/text_buffer.py4
1 files changed, 3 insertions, 1 deletions
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,