summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2011-11-16 02:26:08 +0100
committerFlorent Le Coz <louiz@louiz.org>2011-11-16 02:26:08 +0100
commit4c262c77945f9243ea2a05d2f7980b26e5476cf9 (patch)
tree67e984f50f356fabe32629c3020239a498e2d178
parentefeb0ad58e04104021897c401c73c6e5ff2831d0 (diff)
parenta40199d8ef689af6ec49bf7ec62979031744e425 (diff)
downloadpoezio-4c262c77945f9243ea2a05d2f7980b26e5476cf9.tar.gz
poezio-4c262c77945f9243ea2a05d2f7980b26e5476cf9.tar.bz2
poezio-4c262c77945f9243ea2a05d2f7980b26e5476cf9.tar.xz
poezio-4c262c77945f9243ea2a05d2f7980b26e5476cf9.zip
Merge branch 'master' of http://git.louiz.org/poezio
-rw-r--r--data/default_config.cfg2
-rw-r--r--doc/en/configure.txt5
-rw-r--r--src/windows.py4
3 files changed, 8 insertions, 3 deletions
diff --git a/data/default_config.cfg b/data/default_config.cfg
index dcc12cb7..909c6623 100644
--- a/data/default_config.cfg
+++ b/data/default_config.cfg
@@ -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
diff --git a/doc/en/configure.txt b/doc/en/configure.txt
index 3c03b23d..024bed04 100644
--- a/doc/en/configure.txt
+++ b/doc/en/configure.txt
@@ -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
diff --git a/src/windows.py b/src/windows.py
index c31954d9..2e2c0fd5 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -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):