show_inactive_tabs lets the other chose if she wants to display ALL tabs or just those with activity

This commit is contained in:
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 2011-01-01 13:17:54 +00:00
parent 61245f40eb
commit 94f44a5254
3 changed files with 8 additions and 0 deletions

View file

@ -107,6 +107,10 @@ log_dir =
#photo = ../data/poezio_80.png
# If you want to show all the tabs in the Tab bar, even those
# with no activity, set to true. Else, set to false
show_inactive_tabs = true
# Theme
# If themes_dir is not set, logs will searched for in $XDG_DATA_HOME/poezio/themes,

View file

@ -278,6 +278,7 @@ class InfoTab(ChatTab):
self.input.refresh()
def on_enter(self):
# TODO duplicate
txt = self.input.get_text()
if txt.startswith('/') and not txt.startswith('//') and\
not txt.startswith('/me '):

View file

@ -167,6 +167,9 @@ class GlobalInfoBar(Win):
sorted_tabs = sorted(tabs, key=comp)
for tab in sorted_tabs:
color = tab.get_color_state()
if config.get('show_inactive_tabs', 'true') == 'false' and\
color == theme.COLOR_TAB_NORMAL:
continue
try:
self.addstr("%s" % str(tab.nb), curses.color_pair(color))
self.addstr("|", curses.color_pair(theme.COLOR_INFORMATION_BAR))