From d70988b15125043f8b8261d1e9057c28c23971a6 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 8 Oct 2017 19:57:07 +0200 Subject: Fix #3293 (provide detailed presence in status line) Less eye travel for short statuses. (patch from Ge0rG) --- poezio/windows/info_wins.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'poezio/windows') diff --git a/poezio/windows/info_wins.py b/poezio/windows/info_wins.py index aeaa8680..89832c9c 100644 --- a/poezio/windows/info_wins.py +++ b/poezio/windows/info_wins.py @@ -165,8 +165,13 @@ class ConversationInfoWin(InfoWin): else: presence = resource.presence color = get_theme().color_show(presence) + if not presence: + presence = get_theme().CHAR_STATUS self.addstr('[', to_curses_attr(get_theme().COLOR_INFORMATION_BAR)) - self.addstr(get_theme().CHAR_STATUS, to_curses_attr(color)) + self.addstr(presence, to_curses_attr(color)) + if resource and resource.status: + shortened = resource.status[:20] + (resource.status[:20] and '..') + self.addstr(' %s' % shortened, to_curses_attr(get_theme().COLOR_INFORMATION_BAR)) self.addstr(']', to_curses_attr(get_theme().COLOR_INFORMATION_BAR)) def write_contact_information(self, contact): -- cgit v1.2.3