fix tabs
[enigma2.git] / lib / python / Screens / InfoBarGenerics.py
index 3bc8a419b220f083203e3a05b188c3725fa0f4d8..13c3ad317a0a500defcc8dd1648ad9f2a9cac54a 100644 (file)
@@ -12,6 +12,7 @@ from Components.ServiceEventTracker import ServiceEventTracker
 from Components.Sources.Source import ObsoleteSource
 from Components.Sources.Boolean import Boolean
 from Components.config import config, ConfigBoolean, ConfigClock
+from Components.SystemInfo import SystemInfo
 from EpgSelection import EPGSelection
 from Plugins.Plugin import PluginDescriptor
 
@@ -623,7 +624,7 @@ class InfoBarSeek:
                self.eofInhibitTimer = eTimer()
                self.eofInhibitTimer.timeout.get().append(self.inhibitEof)
 
-               self.minSpeedBackward = 16
+#              self.minSpeedBackward = 16
 
                class InfoBarSeekActionMap(HelpableActionMap):
                        def __init__(self, screen, *args, **kwargs):
@@ -681,12 +682,13 @@ class InfoBarSeek:
        def makeStateBackward(self, n):
                minspeed = config.seek.stepwise_minspeed.value
                repeat = int(config.seek.stepwise_repeat.value)
-               if 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:
+#              if 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)
+#              el
+               if minspeed != "Never" and n >= int(minspeed) and repeat > 1:
                        return (0, -n * repeat, repeat, "<< %dx" % n)
                else:
                        return (0, -n, 0, "<< %dx" % n)
@@ -855,7 +857,7 @@ class InfoBarSeek:
                if self.seekstate == self.SEEK_STATE_PLAY:
                        self.setSeekState(self.makeStateForward(int(config.seek.enter_forward.value)))
                elif self.seekstate == self.SEEK_STATE_PAUSE:
-                       if config.seek.speeds_slowmotion:
+                       if len(config.seek.speeds_slowmotion.value):
                                self.setSeekState(self.makeStateSlowMotion(config.seek.speeds_slowmotion.value[-1]))
                        else:
                                self.setSeekState(self.makeStateForward(int(config.seek.enter_forward.value)))
@@ -1309,13 +1311,13 @@ class InfoBarSleepTimer:
 class InfoBarPiP:
        def __init__(self):
                self.session.pipshown = False
-
-               self.addExtension((self.getShowHideName, self.showPiP, self.available), "blue")
-               self.addExtension((self.getMoveName, self.movePiP, self.pipShown), "green")
-               self.addExtension((self.getSwapName, self.swapPiP, self.pipShown), "yellow")
+               if SystemInfo.get("NumVideoDecoders", 1) > 1:
+                       self.addExtension((self.getShowHideName, self.showPiP, self.available), "blue")
+                       self.addExtension((self.getMoveName, self.movePiP, self.pipShown), "green")
+                       self.addExtension((self.getSwapName, self.swapPiP, self.pipShown), "yellow")
 
        def available(self):
-               return True
+               return SystemInfo.get("NumVideoDecoders", 1) > 1
 
        def pipShown(self):
                return self.session.pipshown
@@ -1883,6 +1885,13 @@ class InfoBarCueSheetSupport:
                                if config.usage.on_movie_start.value == "ask":
                                        Notifications.AddNotificationWithCallback(self.playLastCB, MessageBox, _("Do you want to resume this playback?"), timeout=10)
                                elif config.usage.on_movie_start.value == "resume":
+# TRANSLATORS: The string "Resuming playback" flashes for a moment
+# TRANSLATORS: at the start of a movie, when the user has selected
+# TRANSLATORS: "Resume from last position" as start behavior.
+# TRANSLATORS: The purpose is to notify the user that the movie starts
+# TRANSLATORS: in the middle somewhere and not from the beginning.
+# TRANSLATORS: (Some translators seem to have interpreted it as a
+# TRANSLATORS: question or a choice, but it is a statement.)
                                        Notifications.AddNotificationWithCallback(self.playLastCB, MessageBox, _("Resuming playback"), timeout=2, type=MessageBox.TYPE_INFO)
 
        def playLastCB(self, answer):