def eventSelected(self):
event = self["list"].getCurrent()
- self.session.open(EventView, event, self.eventViewCallback)
+ self.session.open(EventView, event, self.currentService, self.eventViewCallback)
def timerAdd(self):
epg = self["list"].getCurrent()
self.session.nav.RecordTimer.record(answer[1])
else:
print "Timeredit aborted"
-
+
def setRoot(self, root):
+ self.currentService=ServiceReference(root)
self["list"].setRoot(root)
def moveUp(self):
from Components.ActionMap import ActionMap
from Components.Label import Label
from Components.ScrollLabel import ScrollLabel
-from enigma import eWidget, eServiceEventPtr, eLabel
+from enigma import eServiceEventPtr
+from ServiceReference import ServiceReference
class EventView(Screen):
- def __init__(self, session, Event, callback=None):
+ def __init__(self, session, Event, Ref, callback=None):
Screen.__init__(self, session)
self.cbFunc = callback
+ self.currentService=None
self["epg_description"] = ScrollLabel()
self["datetime"] = Label()
self["channel"] = Label()
"nextEvent": self.nextEvent
})
self.setEvent(Event)
+ self.setService(Ref)
def prevEvent(self):
if self.cbFunc is not None:
if self.cbFunc is not None:
self.cbFunc(self.setEvent, +1)
+ def setService(self, service):
+ self.currentService=service
+ name = self.currentService.getServiceName()
+ if name is not None:
+ self["channel"].setText(name)
+ else:
+ self["channel"].setText("unknown service")
+
def setEvent(self, event):
+# FIXME .. how to set eWindow titlebar?
+# self.instance.setTitle(event.getEventName())
text = event.getShortDescription()
if len(text) > 0:
text = text + '\n\n'
text = text + event.getExtendedDescription()
self["epg_description"].setText(text)
self["datetime"].setText(event.getBeginTimeString())
- self["channel"].setText("Unknown Service")
self["duration"].setText("%d min"%(event.getDuration()/60))
def pageUp(self):
const ExtendedEventList *itemlist = eed->getItems();
for (ExtendedEventConstIterator it = itemlist->begin(); it != itemlist->end(); ++it)
{
+ m_extended_description += '\n';
m_extended_description += convertDVBUTF8((*it)->getItemDescription());
m_extended_description += ' ';
m_extended_description += convertDVBUTF8((*it)->getItem());