From c66ec81c4530a806b0aacc2933f6493cdcbbfc82 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 30 Sep 2012 15:03:54 +0200 Subject: =?UTF-8?q?Add=20a=20tab-specific=20=E2=80=9Cignore=5Fchanges?= =?UTF-8?q?=E2=80=9D=20option?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - The documentation is included in the commit --- src/tabs.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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 \ -- cgit v1.2.3