From d89be097be4a9ac52166c5f47cc189c5522d3441 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Fri, 1 Feb 2008 23:15:24 +0000 Subject: add possibilty to hide menu entries when needed hardware is not available --- lib/python/Screens/Setup.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/python/Screens/Setup.py') diff --git a/lib/python/Screens/Setup.py b/lib/python/Screens/Setup.py index f7b4fa58..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, ConfigNothing +from Components.SystemInfo import SystemInfo from Components.ConfigList import ConfigListScreen from Components.Label import Label from Components.Pixmap import Pixmap @@ -133,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 == "": -- cgit v1.2.3