fix linked tuners (i hope)
[enigma2.git] / lib / python / Screens / InfoBarGenerics.py
index f63e9b15bec888b28a729287f6f2b6824a487b51..4f75472871afcd2e32e2c675172939df78df58a0 100644 (file)
@@ -6,6 +6,7 @@ from Components.config import configfile, configsequencearg
 from Components.config import config, configElement, ConfigSubsection, configSequence
 from ChannelSelection import ChannelSelection
 
+from Components.BlinkingPoint import BlinkingPointConditional
 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,
@@ -387,15 +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"] = BlinkingPointConditional("/usr/share/enigma2/record.png")
+               self.onShown.append(self["BlinkingPoint"].hidePoint)
 
        def stopCurrentRecording(self): 
                self.session.nav.RecordTimer.removeEntry(self.recording)
                self.recording = None
+               #self["BlinkingPoint"].stopBlinking()
        
        def startInstantRecording(self):
                serviceref = self.session.nav.getCurrentlyPlayingServiceReference()
@@ -413,6 +417,9 @@ 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())
+               #self["BlinkingPoint"].startBlinking()
 
        def recordQuestionCallback(self, answer):
                if answer == False:
@@ -431,9 +438,9 @@ class InfoBarInstantRecord:
                        return
        
                if self.recording != None:
-                       self.session.openWithCallback(self.recordQuestionCallback, MessageBox, "Do you want to stop the current\n(instant) recording?")
+                       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