- # only open messagebox on first execBegin
- self.onShown.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)
-
+ if self.msgVisible is None:
+ self.onExecBegin.remove(self.showMessageBox)
+ self.msgVisible = False
+
+ if not self.msgVisible:
+ self.msgVisible = True
+ self.avswitch.setInput("SCART")
+ 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)
+
+ def MsgBoxClosed(self, *val):
+ self.msgBox = None
+ self.switchToTV()
+