aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/Scart.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/Screens/Scart.py')
-rw-r--r--lib/python/Screens/Scart.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/python/Screens/Scart.py b/lib/python/Screens/Scart.py
index dc511448..00e78593 100644
--- a/lib/python/Screens/Scart.py
+++ b/lib/python/Screens/Scart.py
@@ -1,10 +1,13 @@
from Screen import Screen
from MessageBox import MessageBox
from Components.AVSwitch import AVSwitch
+from Tools import Notifications
class Scart(Screen):
def __init__(self, session, start_visible=True):
Screen.__init__(self, session)
+ self.msgBox = None
+ self.notificationVisible = None
self.avswitch = AVSwitch()
@@ -22,7 +25,11 @@ class Scart(Screen):
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)
+ 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
@@ -35,3 +42,13 @@ class Scart(Screen):
return
self.avswitch.setInput("ENCODER")
self.msgVisible = False
+ if self.notificationVisible:
+ self.avswitch.setInput("ENCODER")
+ self.notificationVisible = False
+ for notification in Notifications.current_notifications:
+ try:
+ if notification[1].msgBoxID == "scart_msgbox":
+ notification[1].close()
+ except:
+ print "other notification is open. try another one."
+ \ No newline at end of file