mirror of
https://github.com/clockworkpi/launcher.git
synced 2025-12-14 10:48:51 +01:00
Update __init__.py
This change adds the option to reboot with the "X" button
This commit is contained in:
parent
5dd47f599b
commit
200339dddb
@ -11,8 +11,8 @@ import config
|
|||||||
|
|
||||||
class PowerOffConfirmPage(ConfirmPage):
|
class PowerOffConfirmPage(ConfirmPage):
|
||||||
|
|
||||||
_ConfirmText = "Confirm Power OFF?"
|
_ConfirmText = "Awaiting Input?"
|
||||||
|
_FootMsg = ["Nav","Reboot","","Cancel","Shutdown"]
|
||||||
|
|
||||||
def CheckBattery(self):
|
def CheckBattery(self):
|
||||||
try:
|
try:
|
||||||
@ -59,7 +59,11 @@ class PowerOffConfirmPage(ConfirmPage):
|
|||||||
|
|
||||||
cmdpath += "sudo halt -p"
|
cmdpath += "sudo halt -p"
|
||||||
pygame.event.post( pygame.event.Event(RUNSYS, message=cmdpath))
|
pygame.event.post( pygame.event.Event(RUNSYS, message=cmdpath))
|
||||||
|
|
||||||
|
if event.key == CurKeys["X"]:
|
||||||
|
|
||||||
|
cmdpath = "sudo reboot"
|
||||||
|
pygame.event.post( pygame.event.Event(RUNSYS, message=cmdpath))
|
||||||
|
|
||||||
|
|
||||||
class APIOBJ(object):
|
class APIOBJ(object):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user