summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-09-30 15:03:54 +0200
committermathieui <mathieui@mathieui.net>2012-09-30 15:03:54 +0200
commitc66ec81c4530a806b0aacc2933f6493cdcbbfc82 (patch)
tree550d852e12882cd3e2f11e561f3b2167f38cfd54 /src
parente480d8418ab396bddabebca1802c9bcf443e07b4 (diff)
downloadpoezio-c66ec81c4530a806b0aacc2933f6493cdcbbfc82.tar.gz
poezio-c66ec81c4530a806b0aacc2933f6493cdcbbfc82.tar.bz2
poezio-c66ec81c4530a806b0aacc2933f6493cdcbbfc82.tar.xz
poezio-c66ec81c4530a806b0aacc2933f6493cdcbbfc82.zip
Add a tab-specific “ignore_changes” option
- The documentation is included in the commit
Diffstat (limited to 'src')
-rw-r--r--src/tabs.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 327ecfba..9b556ae2 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -169,6 +169,12 @@ class Tab(object):
@state.setter
def state(self, value):
+ if config.get_by_tabname('ignore_changes', 'false', self.get_name(), fallback=False).lower() == 'true':
+ if value == 'current':
+ self._state = 'current'
+ else:
+ self._state = 'normal'
+ return
if not value in STATE_COLORS:
log.debug("Invalid value for tab state: %s", value)
elif STATE_PRIORITY[value] < STATE_PRIORITY[self._state] and \