From 389ae07e59aaf1b8e504801cd49409072f7d3b6b Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Sun, 25 Dec 2005 23:29:43 +0000 Subject: add vcr scart switch to main menu --- lib/python/Components/AVSwitch.py | 7 ++++++- lib/python/Screens/Makefile.am | 2 +- lib/python/Screens/Scart.py | 23 +++++++++++++++++++++++ 3 files changed, 30 insertions(+), 2 deletions(-) create mode 100644 lib/python/Screens/Scart.py (limited to 'lib/python') diff --git a/lib/python/Components/AVSwitch.py b/lib/python/Components/AVSwitch.py index 768b08e9..33ea6600 100644 --- a/lib/python/Components/AVSwitch.py +++ b/lib/python/Components/AVSwitch.py @@ -3,6 +3,7 @@ import os from enigma import * class AVSwitch: + INPUT = { "ENCODER": 0, "SCART": 1, "AUX": 2 } def __init__(self): pass @@ -19,6 +20,9 @@ class AVSwitch: def setWSS(self, value): #print "wss:" + str(value) pass + + def setInput(self, input): + eAVSwitch.getInstance().setInput(self.INPUT[input]) def InitAVSwitch(): config.av = ConfigSubsection(); @@ -46,4 +50,5 @@ def InitAVSwitch(): config.av.aspectratio.addNotifier(setAspectRatio); config.av.tvsystem.addNotifier(setSystem); config.av.wss.addNotifier(setWSS); - + + iAVSwitch.setInput("ENCODER") # init on startup \ No newline at end of file diff --git a/lib/python/Screens/Makefile.am b/lib/python/Screens/Makefile.am index 03c01e9e..95f3a04e 100644 --- a/lib/python/Screens/Makefile.am +++ b/lib/python/Screens/Makefile.am @@ -8,4 +8,4 @@ install_PYTHON = \ EpgSelection.py EventView.py Mute.py Standby.py ServiceInfo.py \ AudioSelection.py InfoBarGenerics.py HelpMenu.py Wizard.py __init__.py \ Dish.py SubserviceSelection.py LanguageSelection.py StartWizard.py \ - TutorialWizard.py PluginBrowser.py MinuteInput.py + TutorialWizard.py PluginBrowser.py MinuteInput.py Scart.py diff --git a/lib/python/Screens/Scart.py b/lib/python/Screens/Scart.py new file mode 100644 index 00000000..50e65f17 --- /dev/null +++ b/lib/python/Screens/Scart.py @@ -0,0 +1,23 @@ +from Screen import Screen +from MessageBox import MessageBox + +from Components.AVSwitch import AVSwitch + +from enigma import * + +class Scart(Screen): + def __init__(self, session): + Screen.__init__(self, session) + + self.avswitch = AVSwitch() + + self.avswitch.setInput("SCART") + + self.onShown.append(self.showMessageBox) + + def showMessageBox(self): + self.session.openWithCallback(self.switchToTV, MessageBox, _("If you see this, something is wrong with\nyour scart connection. Press OK to return."), MessageBox.TYPE_ERROR) + + def switchToTV(self, val): + self.avswitch.setInput("ENCODER") + self.close() \ No newline at end of file -- cgit v1.2.3