diff options
Diffstat (limited to 'lib/python/Components')
| -rw-r--r-- | lib/python/Components/NimManager.py | 10 | ||||
| -rwxr-xr-x | lib/python/Components/config.py | 13 |
2 files changed, 17 insertions, 6 deletions
diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 6dc49dcf..75ad3779 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -835,9 +835,13 @@ class NimManager: def InitSecParams(): config.sec = ConfigSubsection() - x = ConfigInteger(default=15, limits = (0, 9999)) - x.addNotifier(lambda configElement: secClass.setParam(secClass.DELAY_AFTER_CONT_TONE, configElement.value)) - config.sec.delay_after_continuous_tone_change = x + x = ConfigInteger(default=25, limits = (0, 9999)) + x.addNotifier(lambda configElement: secClass.setParam(secClass.DELAY_AFTER_CONT_TONE_DISABLE_BEFORE_DISEQC, configElement.value)) + config.sec.delay_after_continuous_tone_disable_before_diseqc = x + + x = ConfigInteger(default=10, limits = (0, 9999)) + x.addNotifier(lambda configElement: secClass.setParam(secClass.DELAY_AFTER_FINAL_CONT_TONE_CHANGE, configElement.value)) + config.sec.delay_after_final_continuous_tone_change = x x = ConfigInteger(default=10, limits = (0, 9999)) x.addNotifier(lambda configElement: secClass.setParam(secClass.DELAY_AFTER_FINAL_VOLTAGE_CHANGE, configElement.value)) diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index a6d34152..e3a29b52 100755 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -279,6 +279,7 @@ class ConfigSelection(ConfigElement): if default is None: default = self.choices.default() + self._descr = None self.default = self._value = self.last_value = default self.changed() @@ -296,6 +297,7 @@ class ConfigSelection(ConfigElement): self._value = value else: self._value = self.default + self._descr = None self.changed() def tostring(self, val): @@ -307,7 +309,7 @@ class ConfigSelection(ConfigElement): def setCurrentText(self, text): i = self.choices.index(self.value) self.choices[i] = text - self.description[text] = text + self._descr = self.description[text] = text self._value = text value = property(getValue, setValue) @@ -336,13 +338,18 @@ class ConfigSelection(ConfigElement): self.value = self.choices[(i + 1) % nchoices] def getText(self): - descr = self.description[self.value] + if self._descr is not None: + return self._descr + descr = self._descr = self.description[self.value] if descr: return _(descr) return descr def getMulti(self, selected): - descr = self.description[self.value] + if self._descr is not None: + descr = self._descr + else: + descr = self._descr = self.description[self.value] if descr: return ("text", _(descr)) return ("text", descr) |
