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" ],
{
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()
# try to get event info
epg = None
- service = self.session.nav.getCurrentService()
- if service != None:
- info = iServiceInformationPtr()
- if not service.info(info):
- ev = eServiceEventPtr()
- if info.getEvent(ev, 0) == 0:
- epg = ev
+ try:
+ service = self.session.nav.getCurrentService()
+ info = service.info()
+ ev = info.getEvent(0)
+ epg = ev
+ except:
+ pass
+
# fix me, description.
self.recording = self.session.nav.recordWithTimer(time.time(), time.time() + 30, serviceref, epg, "instant record")
def showMovies(self):
self.session.open(MovieSelection)
-