1 from Screens.Screen import Screen
2 from Components.ActionMap import ActionMap, NumberActionMap
3 from Components.Sources.StaticText import StaticText
6 from Components.config import config, getConfigListEntry
7 from Components.ConfigList import ConfigList, ConfigListScreen
9 class CurlyTxSettings(Screen, ConfigListScreen):
11 def __init__(self, session):
12 Screen.__init__(self, session)
13 self.skinName = [ "CurlyTxSettings", "Setup" ]
14 self.setup_title = _("Settings")
16 self["actions"] = ActionMap(["SetupActions"],
18 "cancel": self.keyCancel,
21 #fixme: open page editor
24 self["key_red"] = StaticText(_("Cancel"))
25 self["key_green"] = StaticText(_("OK"))
27 self.onChangedEntry = [ ]
28 ConfigListScreen.__init__(self, self.getConfigList(), session = self.session, on_change = self.changedEntry)
30 def getConfigList(self):
32 list.append(getConfigListEntry(_("Show in main menu"), config.plugins.CurlyTx.menuMain))
33 list.append(getConfigListEntry(_("Menu title"), config.plugins.CurlyTx.menuTitle))
34 # fixme: automatically set that
35 list.append(getConfigListEntry(_("Number of pages"), config.plugins.CurlyTx.pageCount))
37 #list.append(getConfigListEntry(_("Pages"), config.plugins.CurlyTx.pages))
40 def changedEntry(self):
42 for x in self.onChangedEntry:
46 ConfigListScreen.keyLeft(self)
49 ConfigListScreen.keyRight(self)