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.Button import Button
13 from Components.config import config, getConfigListEntry
15 class AutoTimerSettings(Screen, ConfigListScreen):
16 """Configuration of AutoTimer"""
18 skin = """<screen name="AutoTimerSettings" title="Configure AutoTimer behavior" position="75,155" size="565,280">
19 <widget name="config" position="5,5" size="555,225" scrollbarMode="showOnDemand" />
20 <ePixmap position="0,235" zPosition="4" size="140,40" pixmap="skin_default/buttons/red.png" transparent="1" alphatest="on" />
21 <ePixmap position="140,235" zPosition="4" size="140,40" pixmap="skin_default/buttons/green.png" transparent="1" alphatest="on" />
22 <widget name="key_red" position="0,235" zPosition="5" size="140,40" valign="center" halign="center" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" />
23 <widget name="key_green" position="140,235" zPosition="5" size="140,40" valign="center" halign="center" font="Regular;21" transparent="1" foregroundColor="white" shadowColor="black" shadowOffset="-1,-1" />
26 def __init__(self, session):
27 Screen.__init__(self, session)
30 self.setup_title = "AutoTimer Settings"
31 self.onChangedEntry = []
34 getConfigListEntry(_("Poll automatically"), config.plugins.autotimer.autopoll),
35 getConfigListEntry(_("Poll Interval (in h)"), config.plugins.autotimer.interval),
36 getConfigListEntry(_("Modify existing Timers"), config.plugins.autotimer.refresh),
37 getConfigListEntry(_("Guess existing Timer based on Begin/End"), config.plugins.autotimer.try_guessing),
40 ConfigListScreen.__init__(self, self.list, session = session, on_change = self.changed)
43 self["key_red"] = Button(_("Cancel"))
44 self["key_green"] = Button(_("OK"))
47 self["actions"] = ActionMap(["SetupActions"],
49 "cancel": self.keyCancel,
58 for x in self.onChangedEntry:
64 def getCurrentEntry(self):
65 return self["config"].getCurrent()[0]
67 def getCurrentValue(self):
68 return str(self["config"].getCurrent()[1].getText())
70 def createSummary(self):