X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/2884810419e8c4d220c91a0bba1e40e67a2fe158..45164193c322c84366fbde35db544cf005bf20dc:/lib/python/Screens/InfoBarGenerics.py diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index a9f7754b..604f164a 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -6,6 +6,8 @@ from Components.config import configfile, configsequencearg from Components.config import config, configElement, ConfigSubsection, configSequence from ChannelSelection import ChannelSelection +from Components.Pixmap import PixmapConditional +from Components.BlinkingPixmap import BlinkingPixmapConditional from Components.ServiceName import ServiceName from Components.EventInfo import EventInfo @@ -386,16 +388,20 @@ class InfoBarInstantRecord: """Instant Record - handles the instantRecord action in order to start/stop instant records""" def __init__(self): - self["InstnantRecordActions"] = HelpableActionMap(self, "InfobarInstantRecord", + self["InstantRecordActions"] = HelpableActionMap(self, "InfobarInstantRecord", { "instantRecord": (self.instantRecord, "Instant Record..."), }) self.recording = None - + + self["BlinkingPoint"] = BlinkingPixmapConditional() + self.onShown.append(self["BlinkingPoint"].hidePixmap) + self["BlinkingPoint"].setConnect(self.session.nav.RecordTimer.isRecording) + def stopCurrentRecording(self): self.session.nav.RecordTimer.removeEntry(self.recording) self.recording = None - + def startInstantRecording(self): serviceref = self.session.nav.getCurrentlyPlayingServiceReference() @@ -412,12 +418,20 @@ class InfoBarInstantRecord: # fix me, description. self.recording = self.session.nav.recordWithTimer(time.time(), time.time() + 3600, serviceref, epg, "instant record") self.recording.dontSave = True + + #self["BlinkingPoint"].setConnect(lambda: self.recording.isRunning()) + + def isInstantRecordRunning(self): + if self.recording != None: + if self.recording.isRunning(): + return True + return False def recordQuestionCallback(self, answer): if answer == False: return - if self.recording != None: + if self.isInstantRecordRunning(): self.stopCurrentRecording() else: self.startInstantRecording() @@ -429,10 +443,10 @@ class InfoBarInstantRecord: self.session.open(MessageBox, "No HDD found!") return - if self.recording != None: - self.session.openWithCallback(self.recordQuestionCallback, MessageBox, "Do you want to stop the current\n(instant) recording?") + if self.isInstantRecordRunning(): + self.session.openWithCallback(self.recordQuestionCallback, MessageBox, _("Do you want to stop the current\n(instant) recording?")) else: - self.session.openWithCallback(self.recordQuestionCallback, MessageBox, "Start recording?") + self.session.openWithCallback(self.recordQuestionCallback, MessageBox, _("Start recording?")) from Screens.AudioSelection import AudioSelection @@ -449,3 +463,17 @@ class InfoBarAudioSelection: n = audio.getNumberOfTracks() if n > 0: self.session.open(AudioSelection, audio) + +class InfoBarAdditionalInfo: + def __init__(self): + self["DolbyActive"] = PixmapConditional() + # TODO: get the info from c++ somehow + self["DolbyActive"].setConnect(lambda: False) + + self["CryptActive"] = PixmapConditional() + # TODO: get the info from c++ somehow + self["CryptActive"].setConnect(lambda: False) + + self["FormatActive"] = PixmapConditional() + # TODO: get the info from c++ somehow + self["FormatActive"].setConnect(lambda: False) \ No newline at end of file