summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2017-10-08 19:57:07 +0200
committermathieui <mathieui@mathieui.net>2017-10-08 19:57:07 +0200
commitd70988b15125043f8b8261d1e9057c28c23971a6 (patch)
tree8870cafaa052d0cd69aecfcd8a6509bbe57ce98b
parent83ced76bb137cc120fb1ec90adb787bb53359d05 (diff)
downloadpoezio-d70988b15125043f8b8261d1e9057c28c23971a6.tar.gz
poezio-d70988b15125043f8b8261d1e9057c28c23971a6.tar.bz2
poezio-d70988b15125043f8b8261d1e9057c28c23971a6.tar.xz
poezio-d70988b15125043f8b8261d1e9057c28c23971a6.zip
Fix #3293 (provide detailed presence in status line)
Less eye travel for short statuses. (patch from Ge0rG)
-rw-r--r--poezio/windows/info_wins.py7
1 files changed, 6 insertions, 1 deletions
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):