diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-07-14 12:59:18 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2006-07-14 12:59:18 +0000 |
| commit | a65edb264cc943a2a15b6886d9fa3190a92373c0 (patch) | |
| tree | 91bdc462f49092cc04aaf1cbd60367a07cf0918d /lib/python | |
| parent | da3cbd785189e979d5c06eddb965795b24e73d2f (diff) | |
| download | enigma2-a65edb264cc943a2a15b6886d9fa3190a92373c0.tar.gz enigma2-a65edb264cc943a2a15b6886d9fa3190a92373c0.zip | |
add possibility to view eventinfo in recorded movielist (move cursor to
recorded movie and press info)
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Components/MovieList.py | 4 | ||||
| -rw-r--r-- | lib/python/Screens/MovieSelection.py | 18 |
2 files changed, 17 insertions, 5 deletions
diff --git a/lib/python/Components/MovieList.py b/lib/python/Components/MovieList.py index 970180cd..1a61d20f 100644 --- a/lib/python/Components/MovieList.py +++ b/lib/python/Components/MovieList.py @@ -59,6 +59,10 @@ class MovieList(HTMLComponent, GUIComponent): def getCurrentIndex(self): return self.instance.getCurrentIndex() + def getCurrentEvent(self): + l = self.l.getCurrentSelection() + return l and l[0] and l[1] and l[1].getEvent(l[0]) + def getCurrent(self): l = self.l.getCurrentSelection() return l and l[0] diff --git a/lib/python/Screens/MovieSelection.py b/lib/python/Screens/MovieSelection.py index 82c9c7e5..62c797eb 100644 --- a/lib/python/Screens/MovieSelection.py +++ b/lib/python/Screens/MovieSelection.py @@ -20,15 +20,15 @@ class ChannelContextMenu(FixedMenu): def __init__(self, session, csel, service): self.csel = csel self.service = service - + menu = [(_("back"), self.close), (_("delete..."), self.delete)] - + for p in plugins.getPlugins(PluginDescriptor.WHERE_MOVIELIST): menu.append((p.description, boundFunction(self.execPlugin, p))) - + FixedMenu.__init__(self, session, _("Movie Menu"), menu) self.skinName = "Menu" - + def execPlugin(self, plugin): plugin(session=self.session, service=self.service) @@ -89,6 +89,7 @@ class MovieSelection(Screen): { "cancel": self.abort, "ok": self.movieSelected, + "showEventInfo": self.showEventInformation, "contextMenu": self.doContext, }) self["actions"].csel = self @@ -96,7 +97,14 @@ class MovieSelection(Screen): self.lengthTimer = eTimer() self.lengthTimer.timeout.get().append(self.updateLengthData) - + + def showEventInformation(self): + from Screens.EventView import EventViewSimple + from ServiceReference import ServiceReference + evt = self["list"].getCurrentEvent() + if evt: + self.session.open(EventViewSimple, evt, ServiceReference(self.getCurrent())) + def go(self): # ouch. this should redraw our "Please wait..."-text. # this is of course not the right way to do this. |
