from Components.Pixmap import Pixmap
from Components.PluginComponent import plugins
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
self.epglist[1]=tmp
setEvent(self.epglist[0])
-class InfoBarTuner:
- """provides a snr/agc/ber display"""
- def __init__(self):
- self["FrontendStatus"] = ObsoleteSource(new_source = "session.FrontendStatus", removal_date = "2008-01")
-
-class InfoBarEvent:
- """provides a current/next event info display"""
- def __init__(self):
- self["Event_Now"] = ObsoleteSource(new_source = "session.Event_Now", removal_date = "2008-01")
- self["Event_Next"] = ObsoleteSource(new_source = "session.Event_Next", removal_date = "2008-01")
-
class InfoBarRdsDecoder:
"""provides RDS and Rass support/display"""
def __init__(self):
self.RassSlidePicChanged()
self.rds_display.show()
-class InfoBarServiceName:
- def __init__(self):
- self["CurrentService"] = ObsoleteSource(new_source = "session.CurrentService", removal_date = "2008-01")
-
class InfoBarSeek:
"""handles actions like seeking, pause"""
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):
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)
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)))
"instantRecord": (self.instantRecord, _("Instant Record...")),
})
self.recording = []
-#### DEPRECATED CODE ####
- self["BlinkingPoint"] = BlinkingPixmapConditional()
- self["BlinkingPoint"].setConnect(self.session.nav.RecordTimer.isRecording)
- self["BlinkingPoint"].deprecationInfo = (
- "session.RecordState source, Pixmap renderer and "
- "ConditionalShowHide/Blink Converter", "2008-02")
-#########################
def stopCurrentRecording(self, entry = -1):
if entry is not None and entry != -1:
recording.dontSave = True
self.recording.append(recording)
-#### DEPRECATED CODE ####
- self["BlinkingPoint"].setConnect(lambda: self.recording.isRunning())
-#########################
-
def isInstantRecordRunning(self):
print "self.recording:", self.recording
if len(self.recording) > 0:
self["TimeshiftPossible"] = self["RecordingPossible"]
self["ExtensionsAvailable"] = Boolean(fixed=1)
-######### DEPRECATED CODE ##########
- self["NimA"] = Pixmap()
- self["NimA"].deprecationInfo = (
- "session.TunerInfo source, Pixmap renderer, TunerInfo/UseMask Converter"
- ", ValueBitTest(1) Converter and ConditionalShowHide Converter", "2008-02")
- self["NimB"] = Pixmap()
- self["NimB"].deprecationInfo = (
- "session.TunerInfo source, Pixmap renderer, TunerInfo/UseMask Converter"
- ", ValueBitTest(2) Converter and ConditionalShowHide Converter", "2008-02")
- self["NimA_Active"] = Pixmap()
- self["NimA_Active"].deprecationInfo = (
- "session.FrontendInfo source, Pixmap renderer, FrontendInfo/NUMBER Converter"
- ", ValueRange(1,1) Converter and ConditionalShowHide Converter", "2008-02")
- self["NimB_Active"] = Pixmap()
- self["NimB_Active"].deprecationInfo = (
- "session.FrontendInfo source, Pixmap renderer, FrontendInfo/NUMBER Converter"
- ", ValueRange(1,1) Converter and ConditionalShowHide Converter", "2008-02")
-
- res_mgr = eDVBResourceManager.getInstance()
- if res_mgr:
- res_mgr.frontendUseMaskChanged.get().append(self.tunerUseMaskChanged)
-
- self.session.nav.event.append(self.gotServiceEvent) # we like to get service events
-
- def tunerUseMaskChanged(self, mask):
- if mask&1:
- self["NimA_Active"].show()
- else:
- self["NimA_Active"].hide()
- if mask&2:
- self["NimB_Active"].show()
- else:
- self["NimB_Active"].hide()
-
- def checkTunerState(self, service):
- info = service and service.frontendInfo()
- feNumber = info and info.getFrontendInfo(iFrontendInformation.frontendNumber)
- if feNumber is None:
- self["NimA"].hide()
- self["NimB"].hide()
- elif feNumber == 0:
- self["NimB"].hide()
- self["NimA"].show()
- elif feNumber == 1:
- self["NimA"].hide()
- self["NimB"].show()
-
- def gotServiceEvent(self, ev):
- service = self.session.nav.getCurrentService()
- if ev == iPlayableService.evUpdatedInfo or ev == iPlayableService.evEnd:
- self.checkTunerState(service)
-####################################
-
class InfoBarNotifications:
def __init__(self):
self.onExecBegin.append(self.checkNotifications)
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):