Add a show_s2s_errors config option (cf #2182)

This commit is contained in:
mathieui 2013-03-04 16:01:35 +01:00
parent f7204ab0a3
commit f40cfe2669
3 changed files with 9 additions and 2 deletions

View file

@ -258,6 +258,9 @@ show_muc_jid = true
# poezio will only show: toto (2)
show_roster_jids = true
# show s2s errors in the roster
show_s2s_errors = true
# If set to true, the roster will display the offline contacts too
roster_show_offline = false

View file

@ -388,6 +388,10 @@ section of this documentation.
the contact names). If there is no contact name, the JID will still be
displayed.
*show_s2s_errors*:: true
Show s2s errors in the roster or not.
*show_tab_names*:: false
If you want to show the tab name in the bottom Tab bar, set this to true.

View file

@ -1895,7 +1895,7 @@ class RosterWin(Win):
added += 4
if contact.ask:
added += len(get_theme().CHAR_ROSTER_ASKED)
if contact.error:
if config.get('show_s2s_errors', 'true').lower() == 'true' and contact.error:
added += len(get_theme().CHAR_ROSTER_ERROR)
if config.getl('show_roster_jids', 'true') == 'false' and contact.name:
@ -1913,7 +1913,7 @@ class RosterWin(Win):
self.addstr(display_name)
if contact.ask:
self.addstr(get_theme().CHAR_ROSTER_ASKED, to_curses_attr(get_theme().COLOR_IMPORTANT_TEXT))
if contact.error:
if config.get('show_s2s_errors', 'true').lower() == 'true' and contact.error:
self.addstr(get_theme().CHAR_ROSTER_ERROR, to_curses_attr(get_theme().COLOR_ROSTER_ERROR))
self.finish_line()