add possibility to view eventinfo in recorded movielist (move cursor to
[enigma2.git] / lib / python / Screens / MovieSelection.py
index 8e08db88f7d9e1d32f47c28a5c76119328aa6e29..62c797eb0a66eff730c12bfc279ff4bd6dd2441e 100644 (file)
@@ -20,21 +20,23 @@ 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)
 
        def delete(self):
                serviceHandler = eServiceCenter.getInstance()
                offline = serviceHandler.offlineOperations(self.service)
+               info = serviceHandler.info(self.service)
+               name = info and info.getName(self.service) or _("this recording")
                result = False
                if offline is not None:
                        # simulate first
@@ -42,7 +44,7 @@ class ChannelContextMenu(FixedMenu):
                                result = True
                
                if result == True:
-                       self.session.openWithCallback(self.deleteConfirmed, MessageBox, _("Do you really want to delete this recording?"))
+                       self.session.openWithCallback(self.deleteConfirmed, MessageBox, _("Do you really want to delete %s?") % (name))
                else:
                        self.session.openWithCallback(self.close, MessageBox, _("You cannot delete this!"), MessageBox.TYPE_ERROR)
 
@@ -87,6 +89,7 @@ class MovieSelection(Screen):
                        {
                                "cancel": self.abort,
                                "ok": self.movieSelected,
+                               "showEventInfo": self.showEventInformation,
                                "contextMenu": self.doContext,
                        })
                self["actions"].csel = self
@@ -94,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.