HDMICEC : add new plugin
[vuplus_dvbapp] / lib / python / Screens / Standby.py
index 1a7ebbd..0c7670b 100644 (file)
@@ -102,8 +102,10 @@ from enigma import quitMainloop, iRecordableService
 from Screens.MessageBox import MessageBox
 from time import time
 from Components.Task import job_manager
+from Components.config import ConfigYesNo,NoSave
 
 inTryQuitMainloop = False
+config.misc.DeepStandbyOn = NoSave(ConfigYesNo(default=False))
 
 class TryQuitMainloop(MessageBox):
        def __init__(self, session, retvalue=1, timeout=-1, default_yes = True):
@@ -160,14 +162,11 @@ class TryQuitMainloop(MessageBox):
                        self.conntected=False
                        self.session.nav.record_event.remove(self.getRecordEvent)
                if value:
-                       # hack .. we dont like to show any other screens when this screen has closed
-                       self.onClose = [self.__closed]
-                       self.session.dialog_stack = []
-                       self.session.summary_stack = [None]
-               MessageBox.close(self, True)
-
-       def __closed(self):
-               quitMainloop(self.retval)
+                       if self.retval ==1:
+                               config.misc.DeepStandbyOn.value=True
+                       quitMainloop(self.retval)
+               else:
+                       MessageBox.close(self, True)
 
        def __onShow(self):
                global inTryQuitMainloop