aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Screens/Menu.py1
-rw-r--r--lib/python/Screens/Scart.py41
-rw-r--r--lib/python/Screens/ScartLoopThrough.py0
-rw-r--r--lib/python/Screens/__init__.py2
-rw-r--r--lib/python/enigma_python.i1
5 files changed, 30 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",
diff --git a/lib/python/enigma_python.i b/lib/python/enigma_python.i
index 103889b9..cb87359e 100644
--- a/lib/python/enigma_python.i
+++ b/lib/python/enigma_python.i
@@ -156,6 +156,7 @@ typedef long time_t;
%immutable eListbox::selectionChanged;
%immutable eDVBCI_UI::ciStateChanged;
%immutable eDVBResourceManager::frontendUseMaskChanged;
+%immutable eAVSwitch::vcr_sb_notifier;
%include <lib/base/console.h>
%include <lib/base/nconfig.h>