X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=SleepTimer.py;h=a6f39efdc18a39e21b4a5f3dbcfe916f7433c5e4;hp=f9aae1aaa60792ffedef10bb0af8e06bd8e93393;hb=1b6d1b727225a521afeb14149a662846c015e46f;hpb=40abde85c0fbd8c10fdc7f8894c128cb8acf05ee diff --git a/SleepTimer.py b/SleepTimer.py old mode 100644 new mode 100755 index f9aae1a..a6f39ef --- 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)) @@ -22,12 +26,12 @@ class SleepTimerEntry(timer.TimerEntry): if self.state == self.StateRunning: if config.SleepTimer.action.value == "shutdown": if config.SleepTimer.ask.value and not Screens.Standby.inTryQuitMainloop: - Notifications.AddNotificationWithCallback(self.shutdown, MessageBox, _("A sleep timer wants to shut down\nyour Dreambox. Shutdown now?"), timeout = 20) + Notifications.AddNotificationWithCallback(self.shutdown, MessageBox, _("A sleep timer wants to shut down\nyour STB. Shutdown now?"), timeout = 20) else: self.shutdown(True) elif config.SleepTimer.action.value == "standby": if config.SleepTimer.ask.value and not Screens.Standby.inStandby: - Notifications.AddNotificationWithCallback(self.standby, MessageBox, _("A sleep timer wants to set your\nDreambox to standby. Do that now?"), timeout = 20) + Notifications.AddNotificationWithCallback(self.standby, MessageBox, _("A sleep timer wants to set your\nSTB to standby. Do that now?"), timeout = 20) else: self.standby(True) @@ -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