aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/Scart.py
blob: 3bb2ca9cea7234ebdb3af4e9d6cc3734c66c5d67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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.onExecBegin.append(self.showMessageBox)
				
	def showMessageBox(self):
		# only open messagebox on first execBegin
		self.onExecBegin.remove(self.showMessageBox)
		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()