diff options
Diffstat (limited to 'lib/python/Screens')
| -rw-r--r-- | lib/python/Screens/Menu.py | 1 | ||||
| -rw-r--r-- | lib/python/Screens/Scart.py | 41 | ||||
| -rw-r--r-- | lib/python/Screens/ScartLoopThrough.py | 0 | ||||
| -rw-r--r-- | lib/python/Screens/__init__.py | 2 |
4 files changed, 29 insertions, 15 deletions
diff --git a/lib/python/Screens/Menu.py b/lib/python/Screens/Menu.py index d6ec9015..3cc45923 100644 --- a/lib/python/Screens/Menu.py +++ b/lib/python/Screens/Menu.py @@ -24,7 +24,6 @@ from Tools import XMLTools # <item text="TV-Mode">self.setModeTV()</item> # <item text="Radio-Mode">self.setModeRadio()</item> # <item text="File-Mode">self.setModeFile()</item> -# <item text="Scart">self.openDialog(ScartLoopThrough)</item> # <item text="Sleep Timer"></item> diff --git a/lib/python/Screens/Scart.py b/lib/python/Screens/Scart.py index 3bb2ca9c..329300a1 100644 --- a/lib/python/Screens/Scart.py +++ b/lib/python/Screens/Scart.py @@ -6,20 +6,35 @@ from Components.AVSwitch import AVSwitch from enigma import * class Scart(Screen): - def __init__(self, session): + def __init__(self, session, start_visible=True): Screen.__init__(self, session) - + self.avswitch = AVSwitch() - - self.avswitch.setInput("SCART") - - self.onExecBegin.append(self.showMessageBox) - + + if start_visible: + self.onExecBegin.append(self.showMessageBox) + self.msgVisible = None + else: + self.msgVisible = False + def showMessageBox(self): - # 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") + 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() + def switchToTV(self, *val): - self.avswitch.setInput("ENCODER") - self.close() + if self.msgVisible: + if self.msgBox: + self.msgBox.close() # ... MsgBoxClosed -> switchToTV again.. + return + self.avswitch.setInput("ENCODER") + self.msgVisible = False diff --git a/lib/python/Screens/ScartLoopThrough.py b/lib/python/Screens/ScartLoopThrough.py deleted file mode 100644 index e69de29b..00000000 --- a/lib/python/Screens/ScartLoopThrough.py +++ /dev/null diff --git a/lib/python/Screens/__init__.py b/lib/python/Screens/__init__.py index 5eac3b16..9ce0dc6d 100644 --- a/lib/python/Screens/__init__.py +++ b/lib/python/Screens/__init__.py @@ -1,6 +1,6 @@ __all__ = ["ChannelSelection", "ClockDisplay", "ConfigMenu", "InfoBar", "MessageBox", "Menu", "MovieSelection", - "ScartLoopThrough", "Screen", "ServiceScan", "About", + "Screen", "ServiceScan", "About", "TimerEdit", "Setup", "HarddiskSetup", "FixedMenu", "Satconfig", "Scanconfig", "Ci.py", "Volume.py", "Mute.py", "EpgSelection", "EventView", "Standby", "ServiceInfo", |
