2 from Screens.Screen import Screen
3 from Components.ConfigList import ConfigListScreen
6 from Screens.Setup import SetupSummary
9 from Components.ActionMap import ActionMap
10 from Components.Sources.StaticText import StaticText
13 from Components.config import config, getConfigListEntry
15 class StartupToStandbyConfiguration(Screen, ConfigListScreen):
16 """Configuration of Startup To Standby"""
18 def __init__(self, session):
19 Screen.__init__(self, session)
20 self.skinName = [ "StartupToStandbyConfiguration", "Setup" ]
23 self.setup_title = _("StartupToStandby Configuration")
24 self.onChangedEntry = []
27 self["key_red"] = StaticText(_("Cancel"))
28 self["key_green"] = StaticText(_("OK"))
31 self["actions"] = ActionMap(["SetupActions"],
33 "cancel": self.keyCancel,
38 ConfigListScreen.__init__(
41 getConfigListEntry(_("Enabled"), config.plugins.startuptostandby.enabled)
44 on_change = self.changed
50 self.onLayoutFinish.append(self.layoutFinished)
52 def layoutFinished(self):
53 self.setTitle(self.setup_title)
56 for x in self.onChangedEntry:
59 def getCurrentEntry(self):
60 return self["config"].getCurrent()[0]
62 def getCurrentValue(self):
63 return str(self["config"].getCurrent()[1].getText())
65 def createSummary(self):