1 from Screen import Screen
2 from MessageBox import MessageBox
3 from Components.AVSwitch import AVSwitch
6 def __init__(self, session, start_visible=True):
7 Screen.__init__(self, session)
9 self.avswitch = AVSwitch()
12 self.onExecBegin.append(self.showMessageBox)
13 self.msgVisible = None
15 self.msgVisible = False
17 def showMessageBox(self):
18 if self.msgVisible is None:
19 self.onExecBegin.remove(self.showMessageBox)
20 self.msgVisible = False
22 if not self.msgVisible:
23 self.msgVisible = True
24 self.avswitch.setInput("SCART")
25 self.msgBox = self.session.openWithCallback(self.MsgBoxClosed, MessageBox, _("If you see this, something is wrong with\nyour scart connection. Press OK to return."), MessageBox.TYPE_ERROR)
27 def MsgBoxClosed(self, *val):
31 def switchToTV(self, *val):
34 self.msgBox.close() # ... MsgBoxClosed -> switchToTV again..
36 self.avswitch.setInput("ENCODER")
37 self.msgVisible = False