summaryrefslogtreecommitdiff
path: root/src/windows.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-07-31 23:43:19 +0200
committermathieui <mathieui@mathieui.net>2013-07-31 23:43:19 +0200
commit19135d4a76790c0675529eaa7591b326e631d8e6 (patch)
treeac3af0a5871886a15b655a3b5a089e60b20eb609 /src/windows.py
parentb249dad73d2e7c6dde05855ccfbc4d2541cf10d8 (diff)
downloadpoezio-19135d4a76790c0675529eaa7591b326e631d8e6.tar.gz
poezio-19135d4a76790c0675529eaa7591b326e631d8e6.tar.bz2
poezio-19135d4a76790c0675529eaa7591b326e631d8e6.tar.xz
poezio-19135d4a76790c0675529eaa7591b326e631d8e6.zip
Fix #2306 (none, to, and from subscriptions should be more visible)
Added a configuration option and some theme variables.
Diffstat (limited to 'src/windows.py')
-rw-r--r--src/windows.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/windows.py b/src/windows.py
index 0a31deed..6ee9fbfb 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -1974,6 +1974,8 @@ class RosterWin(Win):
self.addstr(y, 0, ' ')
self.addstr(theme.CHAR_STATUS, to_curses_attr(color))
+ show_roster_sub = config.getl('show_roster_subscriptions', '')
+
self.addstr(' ')
if resource:
self.addstr('[+] ' if contact.folded(group) else '[-] ')
@@ -1990,6 +1992,8 @@ class RosterWin(Win):
added += len(get_theme().CHAR_ROSTER_ACTIVITY)
if contact.gaming:
added += len(get_theme().CHAR_ROSTER_GAMING)
+ if show_roster_sub in ('all', 'incomplete', 'to', 'from', 'both', 'none'):
+ added += len(theme.char_subscription(contact.subscription, keep=show_roster_sub))
if config.getl('show_roster_jids', 'true') == 'false' and contact.name:
display_name = '%s' % contact.name
@@ -2004,6 +2008,9 @@ class RosterWin(Win):
self.addstr(display_name, to_curses_attr(get_theme().COLOR_SELECTED_ROW))
else:
self.addstr(display_name)
+
+ if show_roster_sub in ('all', 'incomplete', 'to', 'from', 'both', 'none'):
+ self.addstr(theme.char_subscription(contact.subscription, keep=show_roster_sub), to_curses_attr(theme.COLOR_ROSTER_SUBSCRIPTION))
if contact.ask:
self.addstr(get_theme().CHAR_ROSTER_ASKED, to_curses_attr(get_theme().COLOR_IMPORTANT_TEXT))
if config.get('show_s2s_errors', 'true').lower() == 'true' and contact.error: