From 301bab11f8453a6899153b7be338a352803b22cb Mon Sep 17 00:00:00 2001 From: Ronny Strutz Date: Sun, 28 Aug 2005 23:13:58 +0000 Subject: added setup screens --- lib/python/Screens/ChannelSelection.py | 8 ++-- lib/python/Screens/InfoBar.py | 4 +- lib/python/Screens/Makefile.am | 2 +- lib/python/Screens/Menu.py | 62 ++++++++++++++--------------- lib/python/Screens/Setup.py | 72 +++++++++++++++++++++++++++++++--- lib/python/Screens/TimerEdit.py | 2 +- 6 files changed, 104 insertions(+), 46 deletions(-) (limited to 'lib/python/Screens') diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py index 3155c44d..e421c5c9 100644 --- a/lib/python/Screens/ChannelSelection.py +++ b/lib/python/Screens/ChannelSelection.py @@ -55,10 +55,10 @@ class ChannelSelection(Screen): ## FIXME self.__marked = [ ] - self["key_red"] = Button("red") - self["key_green"] = Button("green") - self["key_yellow"] = Button("yellow") - self["key_blue"] = Button("blue") + self["key_red"] = Button("All") + self["key_green"] = Button("ARD") + self["key_yellow"] = Button("ZDF") + self["key_blue"] = Button("Custom") self["list"] = ServiceList() self["list"].setRoot(eServiceReference("""1:0:1:0:0:0:0:0:0:0:(type == 1)""")) diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py index 0ead7221..44484a51 100644 --- a/lib/python/Screens/InfoBar.py +++ b/lib/python/Screens/InfoBar.py @@ -106,8 +106,8 @@ class InfoBar(Screen): quitMainloop() def instantRecord(self): - self.session.open(MessageBox, "this would be an instant recording! do you really know what you're doing?!") - return + #self.session.open(MessageBox, "this would be an instant recording! do you really know what you're doing?!") + #return if self.recording != None: print "remove entry" diff --git a/lib/python/Screens/Makefile.am b/lib/python/Screens/Makefile.am index 9250018e..e645997d 100644 --- a/lib/python/Screens/Makefile.am +++ b/lib/python/Screens/Makefile.am @@ -3,4 +3,4 @@ installdir = $(LIBDIR)/enigma2/python/Screens install_DATA = \ ChannelSelection.py ClockDisplay.py ConfigMenu.py InfoBar.py Menu.py \ MessageBox.py ScartLoopThrough.py Screen.py ServiceScan.py TimerEdit.py \ - MovieSelection.py Setup.py __init__.py + MovieSelection.py SetupRCU.py Setup.py __init__.py diff --git a/lib/python/Screens/Menu.py b/lib/python/Screens/Menu.py index fd2f2761..11b265e3 100644 --- a/lib/python/Screens/Menu.py +++ b/lib/python/Screens/Menu.py @@ -12,6 +12,8 @@ from Components.Label import Label from Components.ProgressBar import ProgressBar from ConfigMenu import * +from About import * + from TimerEdit import * from enigma import quitMainloop @@ -27,56 +29,50 @@ def doGlobal(screen): screen["clock"] = Clock() +# self.setModeTV() +# self.setModeRadio() +# self.setModeFile() +# self.openDialog(ScartLoopThrough) +# + mdom = xml.dom.minidom.parseString( """ - + quitMainloop() - self.openDialog(ServiceScan) - - self.openSetup("rc") - self.openSetup("blasel") - - self.setModeTV() - self.setModeRadio() - self.setModeFile() - self.openDialog(ScartLoopThrough) self.openDialog(TimerEditList) - + - - - - + self.openSetup("satconfig") + + + self.openDialog(ServiceScan) - - - - - + self.openSetup("timezone") + self.openSetup("avsetup") + self.openSetup("rfmod") - - self.openDialog(configOSD) - - + self.openSetup("rc") + self.openSetup("keyboard") + self.openSetup("osd") + self.openSetup("lcd") - - + self.openSetup("parental") + self.openSetup("expert") - - + + self.openDialog(About) - - - - self.goSetup() + quitMainloop() + quitMainloop() + quitMainloop() """) @@ -142,7 +138,7 @@ class Menu(Screen): self.session.open(dialog) def openSetup(self, dialog): - self.session.open(setup, dialog) + self.session.open(Setup, dialog) def addMenu(self, destList, node): MenuTitle = getValbyAttr(node, "text") diff --git a/lib/python/Screens/Setup.py b/lib/python/Screens/Setup.py index de27ff5e..a694ab16 100644 --- a/lib/python/Screens/Setup.py +++ b/lib/python/Screens/Setup.py @@ -4,6 +4,7 @@ from Components.config import config #global config instance from Components.config import configEntry from Components.config import configBoolean from Components.ConfigList import ConfigList +from Components.Label import Label import xml.dom.minidom from xml.dom import EMPTY_NAMESPACE @@ -13,10 +14,66 @@ from Tools import XMLTools setupdom = xml.dom.minidom.parseString( """ - - config.inputDevices.repeat - config.inputDevices.delay - + + + 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 + + """) def getValbyAttr(x, attr): @@ -66,7 +123,9 @@ class Setup(Screen): print "request setup for " + setup - entries = setupdom.childNodes + xmldata = setupdom.childNodes[0] + + entries = xmldata.childNodes list = [] @@ -83,6 +142,9 @@ class Setup(Screen): self["config"] = ConfigList(list) + self["ok"] = Label("OK") + self["cancel"] = Label("Cancel") + self["actions"] = ActionMap(["SetupActions"], { "cancel": self.close, diff --git a/lib/python/Screens/TimerEdit.py b/lib/python/Screens/TimerEdit.py index f8c9f207..173b1ba2 100644 --- a/lib/python/Screens/TimerEdit.py +++ b/lib/python/Screens/TimerEdit.py @@ -64,7 +64,7 @@ class TimerEditList(Screen): self["actions"] = ActionMap(["OkCancelActions"], { - "ok": self.openEdit, +# "ok": self.openEdit, "cancel": self.close }) -- cgit v1.2.3