summaryrefslogtreecommitdiff
path: root/src/text_buffer.py
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2012-01-24 15:46:51 +0100
committerFlorent Le Coz <louiz@louiz.org>2012-01-26 10:05:37 +0100
commit7512001612a42cc46552a619d876c551e8ee51b1 (patch)
treeedc9884f46d3f5efcf10494792fbef9f983f8cb9 /src/text_buffer.py
parent5924cd4a13ee293b0b9c7bfe87ad70a7e896ae05 (diff)
downloadpoezio-7512001612a42cc46552a619d876c551e8ee51b1.tar.gz
poezio-7512001612a42cc46552a619d876c551e8ee51b1.tar.bz2
poezio-7512001612a42cc46552a619d876c551e8ee51b1.tar.xz
poezio-7512001612a42cc46552a619d876c551e8ee51b1.zip
Make the color for information messages themable
Diffstat (limited to 'src/text_buffer.py')
-rw-r--r--src/text_buffer.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/text_buffer.py b/src/text_buffer.py
index f396bd5b..9b717882 100644
--- a/src/text_buffer.py
+++ b/src/text_buffer.py
@@ -16,6 +16,7 @@ import collections
from datetime import datetime
from config import config
+from theming import get_theme
Message = collections.namedtuple('Message', 'txt nick_color time str_time nickname user')
@@ -44,7 +45,7 @@ class TextBuffer(object):
else:
color = None
# TODO: display the bg color too.
- txt = ("\x195}* \x19%s}" % (color or 5,))+ nickname + ' \x195}' + txt[4:]
+ txt = ("\x19%(info_col)s}* \x19%(col)s}" % {'col':color or 5, 'info_col':get_theme().COLOR_INFORMATION_TEXT[0]})+ nickname + ' \x19%(info_col)s}' % {'info_col':get_theme().COLOR_INFORMATION_TEXT[0]} + txt[4:]
nickname = None
msg = Message(txt='%s\x19o'%(txt.replace('\t', ' '),), nick_color=nick_color,
time=time, str_time=time.strftime("%Y-%m-%d %H:%M:%S")\