user argument to set current service
[enigma2.git] / lib / python / Screens / EpgSelection.py
1 from Screen import Screen
2 from Components.Button import Button
3 from Components.EpgList import EPGList
4 from Components.ActionMap import ActionMap
5
6 from enigma import eServiceReference
7
8 from Screens.FixedMenu import FixedMenu
9
10 import xml.dom.minidom
11
12 class EPGSelection(Screen):
13         def __init__(self, session, root):
14                 Screen.__init__(self, session)
15
16                 self["list"] = EPGList()
17 #               self["list"].setRoot(root)
18
19                 class ChannelActionMap(ActionMap):
20                         def action(self, contexts, action):
21                                         ActionMap.action(self, contexts, action)
22
23                 self["actions"] = ChannelActionMap(["ChannelSelectActions", "OkCancelActions"], 
24                         {
25                                 "cancel": self.close,
26                                 "ok": self.eventSelected,
27                         })
28                 self["actions"].csel = self
29                 setRoot(root)
30
31         def eventSelected(self):
32                 ref = self["list"].getCurrent()
33 # open eventdetail view... not finished yet
34                 self.close()
35         
36         def setRoot(self, root):
37                 self["list"].setRoot(root)
38
39         def moveUp(self):
40                 self["list"].moveUp()
41
42         def moveDown(self):
43                 self["list"].moveDown()