self.list = []
self.updateFilePath = ""
+ self.finishedExit = False
+
self.rebootLock = False
self.rebootMessage = ""
self.cbRebootCallCount = 0;
self.rebootMessage = message
self.reboot_timer = eTimer()
self.reboot_timer.callback.append(self.cbReboot)
- self.reboot_timer.start(500)
+ self.reboot_timer.start(1000)
return
if not self.rebootLock:
self["status"].setText("Press the Green/OK button")
+ def doReboot(self):
+ from Screens.Standby import TryQuitMainloop
+ self.session.open(TryQuitMainloop, 2)
+
def cbReboot(self):
- if self.cbRebootCallCount < 6:
+ max_call_count = 20
+ self.finishedExit = True
+ if self.cbRebootCallCount < max_call_count:
self.cbRebootCallCount = self.cbRebootCallCount + 1
- self["status"].setText("%s (%d)"%(self.rebootMessage, 6-self.cbRebootCallCount))
+ #self["status"].setText("%s (%d)"%(self.rebootMessage, max_call_count-self.cbRebootCallCount))
+ self["status"].setText("Reboot after %d seconds. Press the OK to reboot now."%(max_call_count-self.cbRebootCallCount))
return
- from Screens.Standby import TryQuitMainloop
- self.session.open(TryQuitMainloop, 2)
+ self.doReboot()
# filebrowser window callback function
def cbSetStatus(self, data=None):
self.setupStatus()
def keyGreen(self):
+ if self.finishedExit:
+ self.doReboot()
+ return
self.upgrade_auto_run_timer.stop()
if self.rebootLock:
return