From d17eccddcb6e6a6e4a5c259514355e791933139d Mon Sep 17 00:00:00 2001 From: Ronny Strutz Date: Fri, 2 Sep 2005 01:26:57 +0000 Subject: [PATCH] now infobar disappears after 5s - animation is broken now the self.state is a bit confusing (for non-animation support) --- lib/python/Screens/InfoBar.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py index 28bb39df..0333a8b1 100644 --- a/lib/python/Screens/InfoBar.py +++ b/lib/python/Screens/InfoBar.py @@ -33,6 +33,11 @@ class InfoBar(Screen): self.volumeBar = VolumeBar() self.state = self.STATE_HIDDEN + + self.hideTimer = eTimer() + self.hideTimer.timeout.get().append(self.doTimerHide) + #self.hideTimer.start(1000) + self["actions"] = ActionMap( [ "InfobarActions" ], { @@ -87,13 +92,23 @@ class InfoBar(Screen): def hide(self): self.instance.hide() + def doTimerHide(self): + if self.state == self.STATE_SHOWN: + self.instance.hide() + self.state = self.STATE_HIDDEN + def toggleShow(self): if self.state == self.STATE_SHOWN: -# self.instance.hide() - self.startHide() + self.instance.hide() + #pls check animation support, sorry +# self.startHide() + self.state = self.STATE_HIDDEN else: -# self.instance.show() - self.startShow() + self.instance.show() +# self.startShow() + self.state = self.STATE_SHOWN + #TODO: make it customizable + self.hideTimer.start(5000) def zapUp(self): self.servicelist.moveUp() -- 2.30.2