Merge branch 'master' of fraxinas@git.opendreambox.org:/git/enigma2
[enigma2.git] / lib / python / Screens / SessionGlobals.py
index df884ba970c5b5fc05c4c491b7d5f0afb479ceef..d65acb4d00f610f0fc5a67217c7fbed7fe2f4120 100644 (file)
@@ -1,11 +1,12 @@
-from enigma import iPlayableService
 from Screens.Screen import Screen
 from Components.Sources.CurrentService import CurrentService
 from Components.Sources.EventInfo import EventInfo
 from Components.Sources.FrontendStatus import FrontendStatus
 from Components.Sources.FrontendInfo import FrontendInfo
 from Components.Sources.Source import Source
-from Components.Sources.Misc import Misc
+from Components.Sources.TunerInfo import TunerInfo
+from Components.Sources.RecordState import RecordState
+from Components.Renderer.FrontpanelLed import FrontpanelLed
 
 class SessionGlobals(Screen):
        def __init__(self, session):
@@ -14,17 +15,8 @@ class SessionGlobals(Screen):
                self["Event_Now"] = EventInfo(session.nav, EventInfo.NOW)
                self["Event_Next"] = EventInfo(session.nav, EventInfo.NEXT)
                self["FrontendStatus"] = FrontendStatus(service_source = session.nav.getCurrentService)
-               self["FrontendInfo"] = FrontendInfo(service_source = session.nav.getCurrentService)
+               self["FrontendInfo"] = FrontendInfo(navcore = session.nav)
                self["VideoPicture"] = Source()
-               self["GlobalInfo"] = Misc(session)
-               session.nav.event.append(self.serviceEvent)
-               self.service_state = 0
-
-       def serviceEvent(self, evt):
-               if evt == iPlayableService.evStart:
-                       self.service_state = 1
-               elif evt == iPlayableService.evEnd:
-                       self.service_state = 0
-               elif evt == iPlayableService.evUpdatedInfo and self.service_state == 1:
-                       self.service_state = 2
-                       self["FrontendInfo"].updateFrontendData()
+               self["TunerInfo"] = TunerInfo()
+               self["RecordState"] = RecordState(session)
+               FrontpanelLed().connect(self["RecordState"])