diff options
| author | ghost <andreas.monzner@multimedia-labs.de> | 2008-11-07 20:35:57 +0100 |
|---|---|---|
| committer | ghost <andreas.monzner@multimedia-labs.de> | 2008-11-07 20:35:57 +0100 |
| commit | a90424c0dc460b587898b65f6a89a564399ab551 (patch) | |
| tree | 7af6bd0aa5c42fc1a06cdbd797f769db94f595e4 /lib/python/Components | |
| parent | bf172c73819b5c577d64afcf86c1eb8852a086a3 (diff) | |
| download | enigma2-a90424c0dc460b587898b65f6a89a564399ab551.tar.gz enigma2-a90424c0dc460b587898b65f6a89a564399ab551.zip | |
fix non working invert of oled display
add non working standby slider in display setup
Diffstat (limited to 'lib/python/Components')
| -rw-r--r-- | lib/python/Components/Lcd.py | 10 | ||||
| -rwxr-xr-x | lib/python/Components/config.py | 5 |
2 files changed, 11 insertions, 4 deletions
diff --git a/lib/python/Components/Lcd.py b/lib/python/Components/Lcd.py index 0471843c..0e501237 100644 --- a/lib/python/Components/Lcd.py +++ b/lib/python/Components/Lcd.py @@ -44,9 +44,14 @@ def InitLcd(): ilcd = LCD() - config.lcd.bright = ConfigSlider(default=10, limits=(0, 10)) + config.lcd.standby = ConfigSlider(default=0, limits=(0, 10)) + config.lcd.standby.addNotifier(setLCDbright); + config.lcd.standby.apply = lambda : setLCDbright(config.lcd.standby) + + config.lcd.bright = ConfigSlider(default=5, limits=(0, 10)) config.lcd.bright.addNotifier(setLCDbright); config.lcd.bright.apply = lambda : setLCDbright(config.lcd.bright) + config.lcd.bright.callNotifiersOnSaveAndCancel = True if not ilcd.isOled(): config.lcd.contrast = ConfigSlider(default=5, limits=(0, 20)) @@ -54,9 +59,6 @@ def InitLcd(): else: config.lcd.contrast = ConfigNothing() - config.lcd.standby = ConfigSlider(default=0, limits=(0, 10)) - config.lcd.standby.apply = lambda : setLCDbright(config.lcd.standby) - config.lcd.invert = ConfigYesNo(default=False) config.lcd.invert.addNotifier(setLCDinverted); else: diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index c21a9192..4ddcabec 100755 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -34,6 +34,7 @@ class ConfigElement(object): self.save_disabled = False self.notifiers = [] self.enabled = True + self.callNotifiersOnSaveAndCancel = False # you need to override this to do input validation def setValue(self, value): @@ -66,9 +67,13 @@ class ConfigElement(object): self.saved_value = None else: self.saved_value = self.tostring(self.value) + if self.callNotifiersOnSaveAndCancel: + self.changed() def cancel(self): self.load() + if self.callNotifiersOnSaveAndCancel: + self.changed() def isChanged(self): sv = self.saved_value |
