ChannelList - display item's name in question when is item deleted from bouquet
authorims <ims21@users.sourceforge.net>
Sat, 7 Feb 2015 08:25:05 +0000 (09:25 +0100)
committerlittlesat <littlesat99@yahoo.com>
Sat, 7 Feb 2015 09:01:34 +0000 (10:01 +0100)
Signed-off-by: littlesat <littlesat99@yahoo.com>

lib/python/Screens/ChannelSelection.py

index 5be46d8..84491df 100644 (file)
@@ -266,11 +266,19 @@ class ChannelContextMenu(Screen):
                else:
                        return 0
 
+       def getCurrentSelectionName(self):
+               cur = self.csel.getCurrentSelection()
+               if cur and cur.valid():
+                       name = eServiceCenter.getInstance().info(cur).getName(cur) or ServiceReference(cur).getServiceName() or ""
+                       name.replace('\xc2\x86', '').replace('\xc2\x87', '')
+                       return name
+               return ""
+
        def removeEntry(self):
                if self.removeFunction and self.csel.servicelist.getCurrent() and self.csel.servicelist.getCurrent().valid():
                        if self.csel.confirmRemove:
                                list = [(_("yes"), True), (_("no"), False), (_("yes") + " " + _("and never ask again this session again"), "never")]
-                               self.session.openWithCallback(self.removeFunction, MessageBox, _("Are you sure to remove this entry?"), list=list)
+                               self.session.openWithCallback(self.removeFunction, MessageBox, _("Are you sure to remove this entry?") + "\n%s" % self.getCurrentSelectionName(), list=list)
                        else:
                                self.removeFunction(True)
                else: