summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2011-01-01 13:17:54 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2011-01-01 13:17:54 +0000
commit94f44a5254c0da4ba143a5c3d99349fa54b10a45 (patch)
tree45625c416e0e989fe7f54544bf764e582ccf45b3
parent61245f40eb33545257c34d24701febf35be47690 (diff)
downloadpoezio-94f44a5254c0da4ba143a5c3d99349fa54b10a45.tar.gz
poezio-94f44a5254c0da4ba143a5c3d99349fa54b10a45.tar.bz2
poezio-94f44a5254c0da4ba143a5c3d99349fa54b10a45.tar.xz
poezio-94f44a5254c0da4ba143a5c3d99349fa54b10a45.zip
show_inactive_tabs lets the other chose if she wants to display ALL tabs or just those with activity
-rw-r--r--data/default_config.cfg4
-rw-r--r--src/tabs.py1
-rw-r--r--src/windows.py3
3 files changed, 8 insertions, 0 deletions
diff --git a/data/default_config.cfg b/data/default_config.cfg
index 19ab9009..7f5d6e4c 100644
--- a/data/default_config.cfg
+++ b/data/default_config.cfg
@@ -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,
diff --git a/src/tabs.py b/src/tabs.py
index d6b4d6d9..9c135c87 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -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 '):
diff --git a/src/windows.py b/src/windows.py
index 0f5371b3..f2cec0bd 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -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))