summaryrefslogtreecommitdiff
path: root/poezio/tabs/basetabs.py
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2020-08-14 22:12:16 +0200
committerMaxime “pep” Buquet <pep@bouah.net>2020-08-14 22:12:26 +0200
commit03ef9c8d547872ae7aa87ecec4779bca49309225 (patch)
tree547dca2f342f7f102ec1f6e2d20776ce78bc1974 /poezio/tabs/basetabs.py
parent96f3bd72ac2704534388d993f644ec55abdf31b2 (diff)
downloadpoezio-03ef9c8d547872ae7aa87ecec4779bca49309225.tar.gz
poezio-03ef9c8d547872ae7aa87ecec4779bca49309225.tar.bz2
poezio-03ef9c8d547872ae7aa87ecec4779bca49309225.tar.xz
poezio-03ef9c8d547872ae7aa87ecec4779bca49309225.zip
move date and time SHORT_FORMAT and LONG_FORMAT to the theme
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
Diffstat (limited to 'poezio/tabs/basetabs.py')
-rw-r--r--poezio/tabs/basetabs.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/poezio/tabs/basetabs.py b/poezio/tabs/basetabs.py
index d822ea94..04fc1d8c 100644
--- a/poezio/tabs/basetabs.py
+++ b/poezio/tabs/basetabs.py
@@ -46,7 +46,6 @@ from poezio.logger import logger
from poezio.text_buffer import TextBuffer
from poezio.theming import get_theme, dump_tuple
from poezio.ui.funcs import truncate_nick
-from poezio.ui.consts import LONG_FORMAT_LENGTH
from poezio.ui.types import BaseMessage, InfoMessage, Message
from slixmpp import JID, InvalidJID, Message as SMessage
@@ -802,6 +801,7 @@ class ChatTab(Tab):
message_count = 0
timestamp = config.get('show_timestamps')
nick_size = config.get('max_nick_length')
+ theme = get_theme()
for message in text_buffer.messages:
# Build lines of a message
txt = message.txt
@@ -821,7 +821,7 @@ class ChatTab(Tab):
offset += 1
if timestamp:
if message.history:
- offset += 1 + LONG_FORMAT_LENGTH
+ offset += 1 + theme.LONG_TIME_FORMAT_LENGTH
lines = poopt.cut_text(txt, self.text_win.width - offset - 1)
for line in lines:
built_lines.append(line)