+ self.helpList.append((self["actions"], "InfobarActions", [("showMovies", _("view recordings..."))]))
+ self.helpList.append((self["actions"], "InfobarActions", [("showRadio", _("hear radio..."))]))
+
+ self["CurrentTime"] = ObsoleteSource(new_source = "global.CurrentTime", removal_date = "2008-01")
+
+ self.__event_tracker = ServiceEventTracker(screen=self, eventmap=
+ {
+ iPlayableService.evUpdatedEventInfo: self.__eventInfoChanged
+ })
+
+ self.current_begin_time=0
+
+ def __eventInfoChanged(self):
+ if self.execing:
+ service = self.session.nav.getCurrentService()
+ old_begin_time = self.current_begin_time
+ info = service and service.info()
+ ptr = info and info.getEvent(0)
+ self.current_begin_time = ptr and ptr.getBeginTime() or 0
+ if config.usage.show_infobar_on_event_change.value:
+ if old_begin_time and old_begin_time != self.current_begin_time:
+ self.doShow()
+
+ def __checkServiceStarted(self):
+ self.__serviceStarted(True)
+ self.onExecBegin.remove(self.__checkServiceStarted)
+
+ def serviceStarted(self): #override from InfoBarShowHide
+ new = self.servicelist.newServicePlayed()
+ if self.execing:
+ InfoBarShowHide.serviceStarted(self)
+ self.current_begin_time=0
+ elif not self.__checkServiceStarted in self.onShown and new:
+ self.onShown.append(self.__checkServiceStarted)
+
+ def __checkServiceStarted(self):
+ self.serviceStarted()
+ self.onShown.remove(self.__checkServiceStarted)
+
+ def showTv(self):
+ self.showTvChannelList(True)
+
+ def showRadio(self):
+ if config.usage.e1like_radio_mode.value:
+ self.showRadioChannelList(True)
+ else:
+ self.rds_display.hide() # in InfoBarRdsDecoder
+ self.session.openWithCallback(self.ChannelSelectionRadioClosed, ChannelSelectionRadio, self)
+
+ def ChannelSelectionRadioClosed(self, *arg):
+ self.rds_display.show() # in InfoBarRdsDecoder