aboutsummaryrefslogtreecommitdiff
path: root/SleepTimer.py
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2008-06-23 16:05:19 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2008-06-23 16:05:19 +0000
commit830d79376a0bc82a7c50930c5dc7d48b35bb8a21 (patch)
treee188a3458cd274f285670e944df5b0333b4ac5b7 /SleepTimer.py
parent34a0cb17ee33eed5f31dc0db3a0d4131f7a0da69 (diff)
downloadenigma2-830d79376a0bc82a7c50930c5dc7d48b35bb8a21.tar.gz
enigma2-830d79376a0bc82a7c50930c5dc7d48b35bb8a21.zip
simplify enabling the sleep timer by defaulting the action of the sleep
timer editor to "enable" and restoring the last setting for the sleep time
Diffstat (limited to 'SleepTimer.py')
-rw-r--r--SleepTimer.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/SleepTimer.py b/SleepTimer.py
index f9aae1aa..221e8f0b 100644
--- a/SleepTimer.py
+++ b/SleepTimer.py
@@ -9,6 +9,10 @@ from Components.config import config, ConfigYesNo, ConfigSelection, ConfigSubsec
from Screens.MessageBox import MessageBox
import Screens.Standby
+config.SleepTimer = ConfigSubsection()
+config.SleepTimer.ask = ConfigYesNo(default = True)
+config.SleepTimer.action = ConfigSelection(default = "shutdown", choices = [("shutdown", _("shutdown")), ("standby", _("standby"))])
+
class SleepTimerEntry(timer.TimerEntry):
def __init__(self, begin):
timer.TimerEntry.__init__(self, int(begin), int(begin))
@@ -48,9 +52,6 @@ class SleepTimerEntry(timer.TimerEntry):
class SleepTimer(timer.Timer):
def __init__(self):
- config.SleepTimer = ConfigSubsection()
- config.SleepTimer.ask = ConfigYesNo(default = True)
- config.SleepTimer.action = ConfigSelection(default = "shutdown", choices = [("shutdown", _("shutdown")), ("standby", _("standby"))])
timer.Timer.__init__(self)
self.defaultTime = 30