Fix #3293 (provide detailed presence in status line)
Less eye travel for short statuses. (patch from Ge0rG)
This commit is contained in:
parent
83ced76bb1
commit
d70988b151
1 changed files with 6 additions and 1 deletions
|
@ -165,8 +165,13 @@ class ConversationInfoWin(InfoWin):
|
||||||
else:
|
else:
|
||||||
presence = resource.presence
|
presence = resource.presence
|
||||||
color = get_theme().color_show(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('[', 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))
|
self.addstr(']', to_curses_attr(get_theme().COLOR_INFORMATION_BAR))
|
||||||
|
|
||||||
def write_contact_information(self, contact):
|
def write_contact_information(self, contact):
|
||||||
|
|
Loading…
Reference in a new issue