Do not startup to standby when the UI is restarted
authorLittlesat <littlesat99@yahoo.com>
Sun, 16 Mar 2014 07:13:02 +0000 (08:13 +0100)
committerLittlesat <littlesat99@yahoo.com>
Sun, 16 Mar 2014 07:13:02 +0000 (08:13 +0100)
Thanks IMS for reporting this

Navigation.py
lib/python/Screens/Standby.py
mytest.py

index af1e381..88772a9 100644 (file)
@@ -36,8 +36,11 @@ class Navigation:
                self.__wasTimerWakeup = getFPWasTimerWakeup()
                if self.__wasTimerWakeup:
                        RecordTimer.RecordTimerEntry.setWasInDeepStandby()
-               if config.usage.startup_to_standby.value:
-                       Notifications.AddNotification(Screens.Standby.Standby)  
+               if config.misc.RestartUI.value:
+                       config.misc.RestartUI.value = False
+                       config.misc.RestartUI.save()
+               elif config.usage.startup_to_standby.value:
+                       Notifications.AddNotification(Screens.Standby.Standby)
 
        def wasTimerWakeup(self):
                return self.__wasTimerWakeup
index e929297..fa794d7 100644 (file)
@@ -198,6 +198,9 @@ class TryQuitMainloop(MessageBox):
                        self.hide()
                        if self.retval == 1:
                                config.misc.DeepStandby.value = True
+                       if self.retval == 3:
+                               config.misc.RestartUI.value = True
+                       config.misc.RestartUI.save()
                        self.session.nav.stopService()
                        self.quitScreen = self.session.instantiateDialog(QuitMainloopScreen,retvalue=self.retval)
                        self.quitScreen.show()
index b4aae1b..8e3fdcf 100644 (file)
--- a/mytest.py
+++ b/mytest.py
@@ -45,6 +45,7 @@ config.misc.useTransponderTime = ConfigYesNo(default=True)
 config.misc.startCounter = ConfigInteger(default=0) # number of e2 starts...
 config.misc.standbyCounter = NoSave(ConfigInteger(default=0)) # number of standby
 config.misc.DeepStandby = NoSave(ConfigYesNo(default=False)) # detect deepstandby
+config.misc.RestartUI = ConfigYesNo(default=False) # detect user interface restart
 config.misc.epgcache_filename = ConfigText(default = "/hdd/epg.dat")
 
 def setEPGCachePath(configElement):