X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/5a6713898cddeded5fc88d7316861d88400f57f1..4a7a8362a83b1a6c2bd0abf13cd7b19359e9768a:/lib/python/Screens/InfoBarGenerics.py diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index 7f90b976..5336f9a0 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -366,8 +366,16 @@ class InfoBarSimpleEventView: self["EPGActions"] = HelpableActionMap(self, "InfobarEPGActions", { "showEventInfo": (self.openEventView, _("show event details")), + "showInfobarOrEpgWhenInfobarAlreadyVisible": self.showEventInfoWhenNotVisible, }) + def showEventInfoWhenNotVisible(self): + if self.shown: + self.openEventView() + else: + self.toggleShow() + return 1 + def openEventView(self): epglist = [ ] self.epglist = epglist @@ -684,8 +692,6 @@ class InfoBarSeek: iPlayableService.evSOF: self.__evSOF, }) - self.minSpeedBackward = useSeekBackHack and 16 or 0 - class InfoBarSeekActionMap(HelpableActionMap): def __init__(self, screen, *args, **kwargs): HelpableActionMap.__init__(self, screen, *args, **kwargs) @@ -732,24 +738,19 @@ class InfoBarSeek: self.__seekableStatusChanged() def makeStateForward(self, n): - minspeed = config.seek.stepwise_minspeed.value - repeat = int(config.seek.stepwise_repeat.value) - if minspeed != "Never" and n >= int(minspeed) and repeat > 1: - return (0, n * repeat, repeat, ">> %dx" % n) - else: +# minspeed = config.seek.stepwise_minspeed.value +# repeat = int(config.seek.stepwise_repeat.value) +# if minspeed != "Never" and n >= int(minspeed) and repeat > 1: +# return (0, n * repeat, repeat, ">> %dx" % n) +# else: return (0, n, 0, ">> %dx" % n) def makeStateBackward(self, n): - minspeed = config.seek.stepwise_minspeed.value - repeat = int(config.seek.stepwise_repeat.value) - if self.minSpeedBackward and n < self.minSpeedBackward: - r = (self.minSpeedBackward - 1)/ n + 1 - if minspeed != "Never" and n >= int(minspeed) and repeat > 1: - r = max(r, repeat) - return (0, -n * r, r, "<< %dx" % n) - elif minspeed != "Never" and n >= int(minspeed) and repeat > 1: - return (0, -n * repeat, repeat, "<< %dx" % n) - else: +# minspeed = config.seek.stepwise_minspeed.value +# repeat = int(config.seek.stepwise_repeat.value) +# if minspeed != "Never" and n >= int(minspeed) and repeat > 1: +# return (0, -n * repeat, repeat, "<< %dx" % n) +# else: return (0, -n, 0, "<< %dx" % n) def makeStateSlowMotion(self, n): @@ -869,7 +870,7 @@ class InfoBarSeek: if config.seek.on_pause.value == "play": self.unPauseService() elif config.seek.on_pause.value == "step": - self.doSeekRelative(0) + self.doSeekRelative(1) elif config.seek.on_pause.value == "last": self.setSeekState(self.lastseekstate) self.lastseekstate = self.SEEK_STATE_PLAY @@ -942,7 +943,7 @@ class InfoBarSeek: self.setSeekState(self.makeStateBackward(int(config.seek.enter_backward.value))) self.doSeekRelative(-6) elif seekstate == self.SEEK_STATE_PAUSE: - self.doSeekRelative(-3) + self.doSeekRelative(-1) elif self.isStateForward(seekstate): speed = seekstate[1] if seekstate[2]: @@ -1362,11 +1363,18 @@ class InfoBarSleepTimer: # depends on InfoBarExtensions class InfoBarPiP: def __init__(self): - self.session.pipshown = False + try: + self.session.pipshown + except: + self.session.pipshown = False if SystemInfo.get("NumVideoDecoders", 1) > 1: - self.addExtension((self.getShowHideName, self.showPiP, lambda: True), "blue") - self.addExtension((self.getMoveName, self.movePiP, self.pipShown), "green") - self.addExtension((self.getSwapName, self.swapPiP, self.pipShown), "yellow") + if (self.allowPiP): + self.addExtension((self.getShowHideName, self.showPiP, lambda: True), "blue") + self.addExtension((self.getMoveName, self.movePiP, self.pipShown), "green") + self.addExtension((self.getSwapName, self.swapPiP, self.pipShown), "yellow") + else: + self.addExtension((self.getShowHideName, self.showPiP, self.pipShown), "blue") + self.addExtension((self.getMoveName, self.movePiP, self.pipShown), "green") def pipShown(self): return self.session.pipshown @@ -1595,21 +1603,21 @@ class InfoBarInstantRecord: if self.isInstantRecordRunning(): self.session.openWithCallback(self.recordQuestionCallback, ChoiceBox, \ title=_("A recording is currently running.\nWhat do you want to do?"), \ - list=((_("add recording (stop after current event)"), "event"), \ + list=((_("stop recording"), "stop"), \ + (_("add recording (stop after current event)"), "event"), \ + (_("add recording (indefinitely)"), "indefinitely"), \ (_("add recording (enter recording duration)"), "manualduration"), \ (_("add recording (enter recording endtime)"), "manualendtime"), \ - (_("add recording (indefinitely)"), "indefinitely"), \ (_("change recording (duration)"), "changeduration"), \ (_("change recording (endtime)"), "changeendtime"), \ - (_("stop recording"), "stop"), \ (_("do nothing"), "no"))) else: self.session.openWithCallback(self.recordQuestionCallback, ChoiceBox, \ title=_("Start recording?"), \ list=((_("add recording (stop after current event)"), "event"), \ + (_("add recording (indefinitely)"), "indefinitely"), \ (_("add recording (enter recording duration)"), "manualduration"), \ (_("add recording (enter recording endtime)"), "manualendtime"), \ - (_("add recording (indefinitely)"), "indefinitely"), \ (_("don't record"), "no"))) from Tools.ISO639 import LanguageCodes