show name in delete dialog
authorFelix Domke <tmbinc@elitedvb.net>
Mon, 1 May 2006 12:34:10 +0000 (12:34 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Mon, 1 May 2006 12:34:10 +0000 (12:34 +0000)
lib/python/Screens/MovieSelection.py

index 8e08db8..82c9c7e 100644 (file)
@@ -35,6 +35,8 @@ class ChannelContextMenu(FixedMenu):
        def delete(self):
                serviceHandler = eServiceCenter.getInstance()
                offline = serviceHandler.offlineOperations(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
                result = False
                if offline is not None:
                        # simulate first
@@ -42,7 +44,7 @@ class ChannelContextMenu(FixedMenu):
                                result = True
                
                if result == True:
                                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)
 
                else:
                        self.session.openWithCallback(self.close, MessageBox, _("You cannot delete this!"), MessageBox.TYPE_ERROR)