X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/0ba15307e275a40042a9aa7ac0f33aac7c14e63f..cb52eb273bed4c28716b501fbbf128d2c7046d57:/lib/python/Screens/InfoBarGenerics.py diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index 6b5acc64..3dc59cff 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -6,6 +6,7 @@ from Components.config import configfile, configsequencearg from Components.config import config, configElement, ConfigSubsection, configSequence from ChannelSelection import ChannelSelection +from Components.BlinkingPixmap import BlinkingPixmapConditional from Components.ServiceName import ServiceName from Components.EventInfo import EventInfo @@ -90,7 +91,6 @@ class InfoBarShowHide: STATE_SHOWN = 3 def __init__(self): - print "INFOBARSHOWHIDE init" self["ShowHideActions"] = ActionMap( ["InfobarShowHideActions"] , { "toggleShow": self.toggleShow, @@ -114,6 +114,7 @@ class InfoBarShowHide: def show(self): self.state = self.STATE_SHOWN + self.hideTimer.stop() self.hideTimer.start(5000) def doTimerHide(self): @@ -272,11 +273,15 @@ class InfoBarChannelSelection: def zapUp(self): self.servicelist.moveUp() self.servicelist.zap() + self.instance.show() + self.show() def zapDown(self): self.servicelist.moveDown() self.servicelist.zap() - + self.instance.show() + self.show() + class InfoBarMenu: """ Handles a menu action, to open the (main) menu """ def __init__(self): @@ -382,16 +387,19 @@ 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("/usr/share/enigma2/record.png") + self.onShown.append(self["BlinkingPoint"].hidePoint) def stopCurrentRecording(self): self.session.nav.RecordTimer.removeEntry(self.recording) self.recording = None - + def startInstantRecording(self): serviceref = self.session.nav.getCurrentlyPlayingServiceReference() @@ -408,12 +416,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() @@ -425,10 +441,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