From: Stefan Pluecken Date: Mon, 9 Oct 2006 23:04:49 +0000 (+0000) Subject: add onFirstExecBegin for actions, performed only once when a Screen is executed for... X-Git-Tag: 2.6.0~2968 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/c4c715c30fd6df0beb5c197af52086081216891a add onFirstExecBegin for actions, performed only once when a Screen is executed for the first time --- diff --git a/lib/python/Screens/Screen.py b/lib/python/Screens/Screen.py index 78a88ad8..989f90a9 100644 --- a/lib/python/Screens/Screen.py +++ b/lib/python/Screens/Screen.py @@ -14,6 +14,7 @@ class Screen(dict, HTMLSkin, GUISkin): GUISkin.__init__(self) self.onClose = [ ] + self.onFirstExecBegin = [ ] self.onExecBegin = [ ] self.onShown = [ ] @@ -31,7 +32,10 @@ class Screen(dict, HTMLSkin, GUISkin): def execBegin(self): self.active_components = [ ] - for x in self.onExecBegin: + + single = self.onFirstExecBegin + self.onFirstExecBegin = [] + for x in self.onExecBegin + single: x() if self.session.current_dialog != self: return