remove comment
[enigma2.git] / lib / python / Screens / EpgSelection.py
index 915cc60e9e432020b6e4ae0190a22444582c0f43..9ab18fb0b64004d18f85ec3d5ba214420bff7709 100644 (file)
@@ -2,9 +2,8 @@ from Screen import Screen
 from Components.Button import Button
 from Components.EpgList import EPGList
 from Components.ActionMap import ActionMap
-
-from enigma import eServiceReference
-
+from Screens.EventView import EventView
+from enigma import eServiceReference, eServiceEventPtr
 from Screens.FixedMenu import FixedMenu
 
 import xml.dom.minidom
@@ -14,13 +13,12 @@ class EPGSelection(Screen):
                Screen.__init__(self, session)
 
                self["list"] = EPGList()
-#              self["list"].setRoot(root)
 
                class ChannelActionMap(ActionMap):
                        def action(self, contexts, action):
                                        ActionMap.action(self, contexts, action)
 
-               self["actions"] = ChannelActionMap(["ChannelSelectActions", "OkCancelActions"], 
+               self["actions"] = ChannelActionMap(["EPGSelectActions", "OkCancelActions"], 
                        {
                                "cancel": self.close,
                                "ok": self.eventSelected,
@@ -28,10 +26,17 @@ class EPGSelection(Screen):
                self["actions"].csel = self
                self.setRoot(root)
 
+       def eventViewCallback(self, setEvent, val):
+               if val == -1:
+                       self.moveUp()
+                       setEvent(self["list"].getCurrent())
+               elif val == +1:
+                       self.moveDown()
+                       setEvent(self["list"].getCurrent())
+
        def eventSelected(self):
-               ref = self["list"].getCurrent()
-# open eventdetail view... not finished yet
-               self.close()
+               event = self["list"].getCurrent()
+               self.session.open(EventView, event, self.eventViewCallback)
        
        def setRoot(self, root):
                self["list"].setRoot(root)