show_inactive_tabs lets the other chose if she wants to display ALL tabs or...

show_inactive_tabs lets the other chose if she wants to display ALL tabs or just those with activity
parent 61245f40
......@@ -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,
......
......@@ -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 '):
......
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment