Add an option to display vertical tabs from bottom to top.

This commit is contained in:
Florent Le Coz 2011-11-16 02:23:40 +01:00
parent 034a2bde2c
commit a40199d8ef
3 changed files with 8 additions and 3 deletions

View file

@ -181,6 +181,8 @@ enable_vertical_tab_list = false
vertical_tab_list_size = 20
vertical_tab_list_sort = desc
# The nick of people who join, part, change their status, etc. in a MUC will
# be displayed using their nick color if true.
display_user_color_in_join_part = false

View file

@ -223,7 +223,10 @@ Configuration options
*vertical_tab_list_size*:: 20
Define the width of the vertical tabs. Does nothing if it is not enabled.
*vertical_tab_list_sort*:: desc
If set to desc, the tabs will be displayed from top to bottom in the list,
if set to asc, they will be displayed from bottom to top.
*send_chat_states*:: true

View file

@ -345,9 +345,9 @@ class VerticalGlobalInfoBar(Win):
sorted_tabs = sorted_tabs[pos-height//2 : pos+height//2]
for y, tab in enumerate(sorted_tabs):
color = tab.vertical_color
self.addstr(y, 0, "%2d" % tab.nb, to_curses_attr(get_theme().COLOR_VERTICAL_TAB_NUMBER))
self.addstr(y if config.get('vertical_tab_list_sort', 'desc') != 'asc' else height - y - 1, 0, "%2d" % tab.nb, to_curses_attr(get_theme().COLOR_VERTICAL_TAB_NUMBER))
self.addstr('.')
self._win.addnstr("%s" % tab.get_name(), width - 4, to_curses_attr(color))
self.addnstr("%s" % tab.get_name(), width - 4, to_curses_attr(color))
self._refresh()
class InfoWin(Win):