From 78950dbe85f5eafb3adb817eef742654d1f84e5a Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Tue, 30 Aug 2005 23:22:01 +0000 Subject: [PATCH] use setup.xml for the menu instead of an inline string --- data/Makefile.am | 2 +- data/setup.xml | 60 +++++++++++++++++++++++++++++++++++++ lib/python/Screens/Setup.py | 73 +++++++-------------------------------------- 3 files changed, 71 insertions(+), 64 deletions(-) create mode 100644 data/setup.xml diff --git a/data/Makefile.am b/data/Makefile.am index 77904cb..fcd4e50 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -3,4 +3,4 @@ AUTOMAKE_OPTIONS = gnu installdir = $(DATADIR)/enigma2 install_DATA = \ - skin.xml menu.xml + skin.xml menu.xml setup.xml diff --git a/data/setup.xml b/data/setup.xml new file mode 100644 index 0000000..620ef7c --- /dev/null +++ b/data/setup.xml @@ -0,0 +1,60 @@ + + + config.inputDevices.repeat + config.inputDevices.delay + config.rc.map + + + config.timezone.val + + + config.av.colorformat + config.av.aspectratio + config.av.tvsystem + config.av.wss + config.av.defaultac3 + config.av.vcrswitch + + + config.rfmod.enable + config.rfmod.test + config.rfmod.sound + config.rfmod.soundcarrier + config.rfmod.channel + config.rfmod.finetune + + + config.keyboard.keymap + + + config.osd.alpha + config.osd.bright + config.osd.contrast + config.osd.language + + + config.lcd.bright + config.lcd.standby + config.lcd.invert + + + config.parental.lock + config.parental.setuplock + + + config.expert.splitsize + config.expert.satpos + config.expert.fastzap + config.expert.skipconfirm + config.expert.hideerrors + config.expert.autoinfo + + + config.sat.diseqcA + config.sat.posA + config.sat.satA + config.sat.diseqcB + config.sat.posB + config.sat.satB + + \ No newline at end of file diff --git a/lib/python/Screens/Setup.py b/lib/python/Screens/Setup.py index a694ab1..c643c75 100644 --- a/lib/python/Screens/Setup.py +++ b/lib/python/Screens/Setup.py @@ -12,69 +12,16 @@ from skin import elementsWithTag from Tools import XMLTools -setupdom = xml.dom.minidom.parseString( - """ - - - config.inputDevices.repeat - config.inputDevices.delay - config.rc.map - - - config.timezone.val - - - config.av.colorformat - config.av.aspectratio - config.av.tvsystem - config.av.wss - config.av.defaultac3 - config.av.vcrswitch - - - config.rfmod.enable - config.rfmod.test - config.rfmod.sound - config.rfmod.soundcarrier - config.rfmod.channel - config.rfmod.finetune - - - config.keyboard.keymap - - - config.osd.alpha - config.osd.bright - config.osd.contrast - config.osd.language - - - config.lcd.bright - config.lcd.standby - config.lcd.invert - - - config.parental.lock - config.parental.setuplock - - - config.expert.splitsize - config.expert.satpos - config.expert.fastzap - config.expert.skipconfirm - config.expert.hideerrors - config.expert.autoinfo - - - config.sat.diseqcA - config.sat.posA - config.sat.satA - config.sat.diseqcB - config.sat.posB - config.sat.satB - - - """) +# read the setupmenu +try: + # first we search in the current path + setupfile = file('data/menu.xml', 'r') +except: + # if not found in the current path, we use the global datadir-path + setupfile = file('/usr/share/enigma2/setup.xml', 'r') +setupdom = xml.dom.minidom.parseString(setupfile.read()) +setupfile.close() + def getValbyAttr(x, attr): for p in range(x.attributes.length): -- 2.7.4