fixes bug #436
[enigma2.git] / lib / python / Screens / Standby.py
index b8ccb6c2e219d9644e9f8e8a46adb0ce06ef8f29..406b87cbfe0dd3b765cdb40efdc8f57130746ad8 100644 (file)
@@ -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,30 +61,26 @@ class Standby(Screen):
                        self.avswitch.setInput("SCART")
                else:
                        self.avswitch.setInput("AUX")
-               #set lcd brightness to standby value
-               config.lcd.standby.apply()
-               self.onShow.append(self.__onShow)
-               self.onHide.append(self.__onHide)
+               self.onFirstExecBegin.append(self.__onFirstExecBegin)
                self.onClose.append(self.__onClose)
 
        def __onClose(self):
+               global inStandby
+               inStandby = None
                if self.prev_running_service:
                        self.session.nav.playService(self.prev_running_service)
                elif self.paused_service:
                        self.paused_service.unPauseService()
+               self.session.screen["Standby"].boolean = False
 
-       def createSummary(self):
-               return StandbySummary
-
-       def __onShow(self):
+       def __onFirstExecBegin(self):
                global inStandby
                inStandby = self
                self.session.screen["Standby"].boolean = True
+               config.misc.standbyCounter.value += 1
 
-       def __onHide(self):
-               global inStandby
-               inStandby = None
-               self.session.screen["Standby"].boolean = False
+       def createSummary(self):
+               return StandbySummary
 
 class StandbySummary(Screen):
        skin = """