loading and saving the cable transponders to lamedb works now
[enigma2.git] / lib / python / Screens / Screen.py
index 08e0baa90b0f011bfc6eff75c4cb668705328ed4..a8d0b0481f9efedad6432b1852f2da15a6e925a3 100644 (file)
@@ -15,7 +15,11 @@ class Screen(dict, HTMLSkin, GUISkin):
                self.onExecBegin = [ ]
                self.onShown = [ ]
                
+               self.onShow = [ ]
+               self.onHide = [ ]
+               
                self.execing = False
+               self.shown = False
                
                # in order to support screens *without* a help,
                # we need the list in every screen. how ironic.
@@ -63,9 +67,28 @@ class Screen(dict, HTMLSkin, GUISkin):
                del self.session
                for (name, val) in self.items():
                        del self[name]
+               
+               # really delete all elements now
+               self.__dict__.clear()
        
        def close(self, *retval):
                self.session.close(*retval)
 
        def setFocus(self, o):
                self.instance.setFocus(o.instance)
+
+       def show(self):
+               if self.shown:
+                       return
+               self.shown = True
+               self.instance.show()
+               for x in self.onShow:
+                       x()
+
+       def hide(self):
+               if not self.shown:
+                       return
+               self.shown = False
+               self.instance.hide()
+               for x in self.onHide:
+                       x()