1 from Screen import Screen
2 from MessageBox import MessageBox
4 from Components.AVSwitch import AVSwitch
9 def __init__(self, session, start_visible=True):
10 Screen.__init__(self, session)
12 self.avswitch = AVSwitch()
15 self.onExecBegin.append(self.showMessageBox)
16 self.msgVisible = None
18 self.msgVisible = False
20 def showMessageBox(self):
21 if self.msgVisible is None:
22 self.onExecBegin.remove(self.showMessageBox)
23 self.msgVisible = False
25 if not self.msgVisible:
26 self.msgVisible = True
27 self.avswitch.setInput("SCART")
28 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)
30 def MsgBoxClosed(self, *val):
34 def switchToTV(self, *val):
37 self.msgBox.close() # ... MsgBoxClosed -> switchToTV again..
39 self.avswitch.setInput("ENCODER")
40 self.msgVisible = False