X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fpython%2FScreens%2FInfoBarGenerics.py;h=4f75472871afcd2e32e2c675172939df78df58a0;hp=b88327294087fb625bbe31d0207c996247858990;hb=dc093daa0b0c4b12e33c30fb1b0b48c18ab8f8b5;hpb=b44c3ff96ad305e2d5c0eb87ce3aa4a9abe3cb77;ds=sidebyside diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index b883272..4f75472 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.BlinkingPoint import BlinkingPointConditional from Components.ServiceName import ServiceName from Components.EventInfo import EventInfo @@ -98,19 +99,26 @@ class InfoBarShowHide: self.state = self.STATE_SHOWN + self.onExecBegin.append(self.show) self.onClose.append(self.delHideTimer) self.hideTimer = eTimer() self.hideTimer.timeout.get().append(self.doTimerHide) - self.hideTimer.start(1000) + self.hideTimer.start(5000) def delHideTimer(self): del self.hideTimer def hide(self): self.instance.hide() + + def show(self): + self.state = self.STATE_SHOWN + self.hideTimer.stop() + self.hideTimer.start(5000) def doTimerHide(self): + self.hideTimer.stop() if self.state == self.STATE_SHOWN: self.instance.hide() self.state = self.STATE_HIDDEN @@ -120,14 +128,12 @@ class InfoBarShowHide: self.instance.hide() #pls check animation support, sorry # self.startHide() + self.hideTimer.stop() self.state = self.STATE_HIDDEN - else: + elif self.state == self.STATE_HIDDEN: self.instance.show() -# self.startShow() - self.state = self.STATE_SHOWN - #TODO: make it customizable - self.hideTimer.start(5000) - + self.show() + def startShow(self): self.instance.m_animation.startMoveAnimation(ePoint(0, 600), ePoint(0, 380), 100) self.state = self.STATE_SHOWN @@ -155,7 +161,9 @@ class NumberZap(Screen): def __init__(self, session, number): Screen.__init__(self, session) self.field = str(number) - + + self["channel"] = Label(_("Channel:")) + self["number"] = Label(self.field) self["actions"] = NumberActionMap( [ "SetupActions" ], @@ -265,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): @@ -375,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() @@ -401,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: @@ -419,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