From: ghost Date: Wed, 27 Jan 2010 11:14:14 +0000 (+0100) Subject: cleanup lcd code X-Git-Tag: 2.8.0~75 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/b7a4b4f7228b79424a4a58dbe8de8c7e66e532ae?ds=sidebyside cleanup lcd code --- diff --git a/lib/python/Components/Lcd.py b/lib/python/Components/Lcd.py index 7d27c097..dde158b6 100644 --- a/lib/python/Components/Lcd.py +++ b/lib/python/Components/Lcd.py @@ -28,6 +28,14 @@ class LCD: def isOled(self): return eDBoxLCD.getInstance().isOled() +def leaveStandby(): + config.lcd.bright.apply() + +def standbyCounterChanged(configElement): + from Screens.Standby import inStandby + inStandby.onClose.append(leaveStandby) + config.lcd.standby.apply() + def InitLcd(): detected = eDBoxLCD.getInstance().detected() SystemInfo["Display"] = detected @@ -72,3 +80,6 @@ def InitLcd(): config.lcd.standby = ConfigNothing() config.lcd.bright.apply = lambda : doNothing() config.lcd.standby.apply = lambda : doNothing() + + config.misc.standbyCounter.addNotifier(standbyCounterChanged, initial_call = False) + diff --git a/lib/python/Screens/Standby.py b/lib/python/Screens/Standby.py index c598b545..406b87cb 100644 --- a/lib/python/Screens/Standby.py +++ b/lib/python/Screens/Standby.py @@ -15,8 +15,6 @@ class Standby(Screen): #restart last played service #unmute adc self.leaveMute() - #set brightness of lcd - config.lcd.bright.apply() #kill me self.close(True) @@ -63,8 +61,6 @@ class Standby(Screen): self.avswitch.setInput("SCART") else: self.avswitch.setInput("AUX") - #set lcd brightness to standby value - config.lcd.standby.apply() self.onFirstExecBegin.append(self.__onFirstExecBegin) self.onClose.append(self.__onClose)