From b0ce62b0d959fd0d2d20022d803acb1c100d2bb5 Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Tue, 18 Apr 2006 18:49:26 +0000 Subject: fix Scart.py, add some asserts to find this kind of bugs earlier --- lib/python/Screens/Scart.py | 6 ++++-- lib/python/Screens/Screen.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Screens/Scart.py b/lib/python/Screens/Scart.py index cae46b23..e8b7a4a7 100644 --- a/lib/python/Screens/Scart.py +++ b/lib/python/Screens/Scart.py @@ -13,11 +13,13 @@ class Scart(Screen): self.avswitch.setInput("SCART") - self.onShown.append(self.showMessageBox) + self.onExecBegin.append(self.showMessageBox) def showMessageBox(self): + # only open messagebox on first execBegin + self.onShown.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) - def switchToTV(self, val): + def switchToTV(self, *val): self.avswitch.setInput("ENCODER") self.close() diff --git a/lib/python/Screens/Screen.py b/lib/python/Screens/Screen.py index d4b3d729..e6abdef9 100644 --- a/lib/python/Screens/Screen.py +++ b/lib/python/Screens/Screen.py @@ -74,7 +74,7 @@ class Screen(dict, HTMLSkin, GUISkin): self.__dict__.clear() def close(self, *retval): - self.session.close(*retval) + self.session.close(self, *retval) def setFocus(self, o): self.instance.setFocus(o.instance) -- cgit v1.2.3