From 03ef9c8d547872ae7aa87ecec4779bca49309225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Fri, 14 Aug 2020 22:12:16 +0200 Subject: move date and time SHORT_FORMAT and LONG_FORMAT to the theme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- plugins/display_corrections.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/display_corrections.py b/plugins/display_corrections.py index 69df154f..cf8107ce 100644 --- a/plugins/display_corrections.py +++ b/plugins/display_corrections.py @@ -26,7 +26,7 @@ from poezio.plugin import BasePlugin from poezio.common import shell_split from poezio import tabs from poezio.ui.types import Message -from poezio.ui.consts import SHORT_FORMAT +from poezio.theming import get_theme class Plugin(BasePlugin): @@ -56,6 +56,7 @@ class Plugin(BasePlugin): return None def command_display_corrections(self, args): + theme = get_theme() args = shell_split(args) if len(args) == 1: try: @@ -68,7 +69,7 @@ class Plugin(BasePlugin): if message: display = [] while message: - str_time = message.time.strftime(SHORT_FORMAT) + str_time = message.time.strftime(theme.SHORT_TIME_FORMAT) display.append('%s %s%s%s %s' % (str_time, '* ' if message.me else '', message.nickname, '' -- cgit v1.2.3