From 320af8d597644b9e7e21d0faef6143cfc62fc441 Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Fri, 13 Feb 2009 14:59:26 +0100 Subject: [PATCH] don't handle powerlong unless dialog can handle it --- mytest.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mytest.py b/mytest.py index 8f23bea..ee22e20 100644 --- a/mytest.py +++ b/mytest.py @@ -343,6 +343,9 @@ class PowerKey: self.session.open(Screens.Standby.TryQuitMainloop, 1) def powerlong(self): + if Screens.Standby.inTryQuitMainloop or (self.session.current_dialog and not self.session.current_dialog.ALLOW_SUSPEND): + return + self.standbyblocked = 1 action = config.usage.on_long_powerpress.value if action == "shutdown": -- 2.7.4