hide Timer: delete onClose
authorFelix Domke <tmbinc@elitedvb.net>
Fri, 18 Nov 2005 16:08:53 +0000 (16:08 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Fri, 18 Nov 2005 16:08:53 +0000 (16:08 +0000)
lib/python/Screens/InfoBarGenerics.py
lib/python/Screens/Screen.py

index 68e082e..b883272 100644 (file)
@@ -96,11 +96,16 @@ class InfoBarShowHide:
                                "hide": self.hide,
                        })
 
                                "hide": self.hide,
                        })
 
-               self.state = self.STATE_HIDDEN
+               self.state = self.STATE_SHOWN
+               
+               self.onClose.append(self.delHideTimer)
                
                self.hideTimer = eTimer()
                self.hideTimer.timeout.get().append(self.doTimerHide)
                
                self.hideTimer = eTimer()
                self.hideTimer.timeout.get().append(self.doTimerHide)
-               #self.hideTimer.start(1000)
+               self.hideTimer.start(1000)
+
+       def delHideTimer(self):
+               del self.hideTimer
 
        def hide(self): 
                self.instance.hide()
 
        def hide(self): 
                self.instance.hide()
index e9f9aff..b1e5a51 100644 (file)
@@ -11,6 +11,8 @@ class Screen(dict, HTMLSkin, GUISkin):
                self.session = session
                GUISkin.__init__(self)
                
                self.session = session
                GUISkin.__init__(self)
                
+               self.onClose = [ ]
+               
                # in order to support screens *without* a help,
                # we need the list in every screen. how ironic.
                self.helpList = [ ]
                # in order to support screens *without* a help,
                # we need the list in every screen. how ironic.
                self.helpList = [ ]
@@ -29,6 +31,9 @@ class Screen(dict, HTMLSkin, GUISkin):
        
        # never call this directly - it will be called from the session!
        def doClose(self):
        
        # never call this directly - it will be called from the session!
        def doClose(self):
+               for x in self.onClose:
+                       x()
+               
                # fixup circular references
                del self.helpList
                GUISkin.close(self)
                # fixup circular references
                del self.helpList
                GUISkin.close(self)