--- /dev/null
+from HTMLComponent import *
+from GUIComponent import *
+
+from enigma import *
+
+class EPGList(HTMLComponent, GUIComponent):
+ def __init__(self):
+ GUIComponent.__init__(self)
+ self.l = eListboxEPGContent()
+
+ def getCurrent(self):
+ r = eServiceEventPtr()
+ self.l.getCurrent(r)
+ return r
+
+ def moveUp(self):
+ self.instance.moveSelection(self.instance.moveUp)
+
+ def moveDown(self):
+ self.instance.moveSelection(self.instance.moveDown)
+
+ def GUIcreate(self, parent):
+ self.instance = eListbox(parent)
+ self.instance.setContent(self.l)
+
+ def GUIdelete(self):
+ self.instance = None
+
+ def setRoot(self, root):
+ self.l.setRoot(root)
+ self.l.sort()
+
+# def setMode(self, mode):
+# if mode == self.MODE_NORMAL:
+# self.instance.setItemHeight(20)
+# self.l.setVisualMode(eListboxServiceContent.visModeSimple)
+# else:
+# self.instance.setItemHeight(40)
+# self.l.setElementFont(self.l.celServiceName, gFont("Arial", 30))
+# self.l.setElementPosition(self.l.celServiceName, eRect(40, 0, self.instance.size().width(), 40))
+# self.l.setElementFont(self.l.celServiceNumber, gFont("Arial", 20))
+# self.l.setElementPosition(self.l.celServiceNumber, eRect(0, 10, 40, 30))
+#
+# self.l.setVisualMode(eListboxServiceContent.visModeComplex)
self.movemode = False
else:
self.movemode = True
-
+
+ def getCurrent(self):
+ return self["list"].getCurrent()
+
def showFavourites(self):
l = self["list" ]
l.setRoot(eServiceReference('1:0:1:0:0:0:0:0:0:0:(provider == "fav")'))
--- /dev/null
+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.FixedMenu import FixedMenu
+
+import xml.dom.minidom
+
+class EPGSelection(Screen):
+ def __init__(self, session):
+ 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"],
+ {
+ "cancel": self.close,
+ "ok": self.eventSelected,
+ })
+ self["actions"].csel = self
+
+ def eventSelected(self):
+ ref = self["list"].getCurrent()
+# open eventdetail view... not finished yet
+ self.close()
+
+ def setRoot(self, root):
+ self["list"].setRoot(root)
+
+ def moveUp(self):
+ self["list"].moveUp()
+
+ def moveDown(self):
+ self["list"].moveDown()
from Screen import Screen
+from EpgSelection import EPGSelection
from ChannelSelection import ChannelSelection
from Components.Clock import Clock
from Components.ActionMap import ActionMap
"hide": self.hide,
"toggleShow": self.toggleShow,
"showMovies": self.showMovies,
- "quit": self.quit
+ "quit": self.quit,
+ "showEPGList": self.showEPGList
})
# self["okbutton"] = Button("mainMenu", [self.mainMenu])
self.muteDialog.instance.show()
else:
self.muteDialog.instance.hide()
-
- def quit(self):
+
+ def showEPGList(self):
+# TODO hier irgendwie EPGSelection benutzen und setRoot benutzen um nen service zu uebergeben
+# self.session.nav.getCurrentlyPlayingServiceReference() sollte das wohl sein
+ print "hier soll mal ne EPGList aufgehen"
+
+ def quit(self):
configfile.save()
quitMainloop()