From: Felix Domke Date: Thu, 15 Jun 2006 17:38:33 +0000 (+0000) Subject: support for renderer X-Git-Tag: 2.6.0~3317 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/36dc37e5d0c9ef8fc5f923ad38ee6cc98f316556 support for renderer --- diff --git a/lib/python/Components/GUISkin.py b/lib/python/Components/GUISkin.py index 3aa9c851..406cd097 100644 --- a/lib/python/Components/GUISkin.py +++ b/lib/python/Components/GUISkin.py @@ -9,7 +9,7 @@ class GUISkin: self.summaries = [ ] def createGUIScreen(self, parent, desktop): - for (name, val) in self.items(): + for val in self.values() + self.renderer: if isinstance(val, GUIComponent): val.GUIcreate(parent) val.applySkin(desktop) diff --git a/lib/python/Screens/Screen.py b/lib/python/Screens/Screen.py index e6abdef9..bbc6b1ec 100644 --- a/lib/python/Screens/Screen.py +++ b/lib/python/Screens/Screen.py @@ -35,7 +35,7 @@ class Screen(dict, HTMLSkin, GUISkin): # assert self.session == None, "a screen can only exec once per time" # self.session = session - for (name, val) in self.items(): + for val in self.values() + self.renderer: val.execBegin() if self.session.current_dialog != self: return @@ -70,6 +70,11 @@ class Screen(dict, HTMLSkin, GUISkin): val.destroy() del self[name] + for val in self.renderer: + val.destroy() + + self.renderer = [ ] + # really delete all elements now self.__dict__.clear() @@ -86,7 +91,7 @@ class Screen(dict, HTMLSkin, GUISkin): self.instance.show() for x in self.onShow: x() - for (name, val) in self.items(): + for val in self.values() + self.renderer: if isinstance(val, GUIComponent): val.onShow() @@ -97,6 +102,6 @@ class Screen(dict, HTMLSkin, GUISkin): self.instance.hide() for x in self.onHide: x() - for (name, val) in self.items(): + for val in self.values() + self.renderer: if isinstance(val, GUIComponent): val.onHide()