Update PowerOFF (Sync Ver.200626)

This commit is contained in:
hi80482 2020-07-03 16:13:06 +08:00 committed by GitHub
parent c6c2954b23
commit b3cb1bdb88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,7 @@ import config
class PowerOffConfirmPage(ConfirmPage):
_ConfirmText = MyLangManager.Tr("Awaiting Input")
_FootMsg = ["Nav","","Reboot","Cancel","Shutdown"]
_FootMsg = ["Nav","Suspend","Reboot","Cancel","Shutdown"]
def CheckBattery(self):
try:
@ -67,6 +67,11 @@ class PowerOffConfirmPage(ConfirmPage):
cmdpath += "sudo reboot"
pygame.event.post( pygame.event.Event(RUNSYS, message=cmdpath))
if event.key == CurKeys["Y"]:
cmdpath = "feh --bg-center %s;" % MySkinManager.GiveWallpaper("seeyou.png")
cmdpath += "sleep 3;"
cmdpath += "sudo pm-suspend"
pygame.event.post( pygame.event.Event(RUNSYS, message=cmdpath))
class APIOBJ(object):
@ -92,4 +97,3 @@ def Init(main_screen):
OBJ.Init(main_screen)
def API(main_screen):
OBJ.API(main_screen)