X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/10502348ab4f43a465c606cb68a6f0b7f1f8ce07..d9d6fde89ffbca9f094e369124d64353916a1e72:/lib/python/Screens/Menu.py diff --git a/lib/python/Screens/Menu.py b/lib/python/Screens/Menu.py index da36eb38..71d5123f 100644 --- a/lib/python/Screens/Menu.py +++ b/lib/python/Screens/Menu.py @@ -1,21 +1,30 @@ -from Screen import * +#from Screen import * from Components.MenuList import MenuList from Components.ActionMap import ActionMap from Components.Header import Header # hack ... must be made dynamic -from Screens.Setup import Setup -from ServiceScan import ServiceScan -from ScartLoopThrough import ScartLoopThrough -from HarddiskSetup import HarddiskSelection -from Components.Button import Button -from Components.Label import Label -from Components.ProgressBar import ProgressBar -from ConfigMenu import * +#from Screens.Setup import Setup +#from ServiceScan import ServiceScan +#from ScartLoopThrough import ScartLoopThrough +#from HarddiskSetup import HarddiskSelection +#from Components.Button import Button +#from Components.Label import Label +#from Components.ProgressBar import ProgressBar +#from ConfigMenu import * -from About import * +#from About import * -from TimerEdit import * +#from Network import * + +#from TimerEdit import * + +# hack.... dynamically importing all screens +from __init__ import __all__ +for i in __all__: + print "import " + i + if (i is not "Menu" ): + exec "from " + i + " import *" from enigma import quitMainloop @@ -36,46 +45,18 @@ def doGlobal(screen): # self.openDialog(ScartLoopThrough) # -mdom = xml.dom.minidom.parseString( - """ - - quitMainloop() - self.openDialog(TimerEditList) - - - - - - - - self.openSetup("satconfig") - - - - self.openDialog(ServiceScan) - - - self.openSetup("timezone") - self.openSetup("avsetup") - self.openSetup("rfmod") - self.openDialog(HarddiskSelection) - self.openSetup("rc") - self.openSetup("keyboard") - self.openSetup("osd") - self.openSetup("lcd") - - - self.openSetup("parental") - self.openSetup("expert") - - - self.openDialog(About) - - quitMainloop() - quitMainloop() - quitMainloop() - - """) + +# read the menu +try: + # first we search in the current path + menufile = file('data/menu.xml', 'r') +except: + # if not found in the current path, we use the global datadir-path + menufile = file('/usr/share/enigma2/menu.xml', 'r') +mdom = xml.dom.minidom.parseString(menufile.read()) +menufile.close() + + def getValbyAttr(x, attr): for p in range(x.attributes.length):