X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/e3cf5b5fa950fc14a6a48b75cec28c8f95553aeb..7f088b2e0ec5051c3b9b9a1942198f0be28f315b:/lib/python/Screens/Setup.py diff --git a/lib/python/Screens/Setup.py b/lib/python/Screens/Setup.py index 1f262e32..f352e8cb 100644 --- a/lib/python/Screens/Setup.py +++ b/lib/python/Screens/Setup.py @@ -1,6 +1,7 @@ from Screen import Screen from Components.ActionMap import NumberActionMap -from Components.config import config +from Components.config import config, ConfigNothing +from Components.SystemInfo import SystemInfo from Components.ConfigList import ConfigListScreen from Components.Label import Label from Components.Pixmap import Pixmap @@ -78,6 +79,9 @@ class Setup(ConfigListScreen, Screen): def __init__(self, session, setup): Screen.__init__(self, session) + # for the skin: first try a setup_, then Setup + self.skinName = ["setup_" + setup, "Setup" ] + self.onChangedEntry = [ ] self.setup = setup @@ -130,6 +134,10 @@ class Setup(ConfigListScreen, Screen): if item_level > config.usage.setup_level.index: continue + requires = x.getAttribute("requires") + if requires and not SystemInfo.get(requires, False): + continue; + item_text = _(x.getAttribute("text").encode("UTF-8") or "??") b = eval(XMLTools.mergeText(x.childNodes)); if b == "": @@ -138,7 +146,8 @@ class Setup(ConfigListScreen, Screen): item = b # the first b is the item itself, ignored by the configList. # the second one is converted to string. - list.append( (item_text, item) ) + if not isinstance(item, ConfigNothing): + list.append( (item_text, item) ) def getSetupTitle(id): xmldata = setupdom.childNodes[0].childNodes