X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=mytest.py;h=5bc08914afdab5ad1170ae8f1ce3fee90df9c939;hb=6bf2f1a4c1980a402631713a53268fa2da8d916a;hp=2b032e6c2244ff10169862e491d0be2516779f11;hpb=ed40f6f85c9c07c3c1224ae20601082c0309a631;p=vuplus_dvbapp diff --git a/mytest.py b/mytest.py index 2b032e6..5bc0891 100644 --- a/mytest.py +++ b/mytest.py @@ -387,7 +387,7 @@ class VolumeControl: self.muteDialog.hide() self.volumeDialog.setValue(vol) -from Screens.Standby import Standby +from Screens.Standby import Standby, TryQuitMainloop, inTryQuitMainloop class PowerKey: """ PowerKey stuff - handles the powerkey press and powerkey release actions""" @@ -409,7 +409,9 @@ class PowerKey: def powertimer(self): print "PowerOff - Now!" - self.quit() + global inTryQuitMainloop + if not inTryQuitMainloop: + self.session.open(TryQuitMainloop, 1) def powerdown(self): self.standbyblocked = 0 @@ -423,11 +425,7 @@ class PowerKey: def standby(self): if self.session.current_dialog and self.session.current_dialog.ALLOW_SUSPEND: - self.session.open(Standby, self) - - def quit(self): - # halt - quitMainloop(1) + self.session.open(Standby) from Screens.Scart import Scart @@ -489,7 +487,7 @@ def runScreenTest(): # we need session.scart to access it from within menu.xml session.scart = AutoScartControl(session) - + runReactor() configfile.save()