- # 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)
-
+ if self.msgVisible is None:
+ self.onExecBegin.remove(self.showMessageBox)
+ self.msgVisible = False
+
+ if not self.msgVisible:
+ self.msgVisible = True
+ self.avswitch.setInput("SCART")
+ if not self.session.in_exec:
+ self.notificationVisible = True
+ Notifications.AddNotificationWithCallback(self.MsgBoxClosed, MessageBox, _("If you see this, something is wrong with\nyour scart connection. Press OK to return."), MessageBox.TYPE_ERROR, msgBoxID = "scart_msgbox")
+ else:
+ 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()
+