X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fpython%2FScreens%2FScart.py;h=00e78593a6abc592d6a0b8b998e9a8502bc560cd;hp=329300a1428649ec892908681560f7011de427e4;hb=0fee8bdaa26f854460b63475c91f1f2cf762594b;hpb=e03c732afb410b4d6b9f9540c36c33c941ee38f1 diff --git a/lib/python/Screens/Scart.py b/lib/python/Screens/Scart.py index 329300a..00e7859 100644 --- a/lib/python/Screens/Scart.py +++ b/lib/python/Screens/Scart.py @@ -1,13 +1,13 @@ from Screen import Screen from MessageBox import MessageBox - from Components.AVSwitch import AVSwitch - -from enigma import * +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() @@ -25,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 @@ -38,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