From a2631286334924801423dbb88f4f2f7e3c2c3c27 Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Tue, 30 Aug 2005 23:12:31 +0000 Subject: use menu.xml for the menu instead of an inline string --- lib/python/Screens/Menu.py | 52 +++++++++++----------------------------------- 1 file changed, 12 insertions(+), 40 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Screens/Menu.py b/lib/python/Screens/Menu.py index da36eb38..b773c182 100644 --- a/lib/python/Screens/Menu.py +++ b/lib/python/Screens/Menu.py @@ -36,46 +36,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 skin +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): -- cgit v1.2.3