From b3cb1bdb8890dbb5053040b90c5e9e97391b3dc3 Mon Sep 17 00:00:00 2001 From: hi80482 <66435094+hi80482@users.noreply.github.com> Date: Fri, 3 Jul 2020 16:13:06 +0800 Subject: [PATCH] Update PowerOFF (Sync Ver.200626) --- Menu/GameShell/99_PowerOFF/__init__.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Menu/GameShell/99_PowerOFF/__init__.py b/Menu/GameShell/99_PowerOFF/__init__.py index 740d0aa..925b701 100644 --- a/Menu/GameShell/99_PowerOFF/__init__.py +++ b/Menu/GameShell/99_PowerOFF/__init__.py @@ -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) -