"finished" message also when skipping configuration backup
[enigma2.git] / lib / python / Screens / ChannelSelection.py
index 1e7f9f2a93efbb7c874048dd7d435db464978b81..b203b24e7577c90e041bf49d46d39258d0c599c4 100644 (file)
@@ -21,7 +21,6 @@ profile("ChannelSelection.py 2.3")
 from Components.Input import Input
 profile("ChannelSelection.py 3")
 from Components.ParentalControl import parentalControl
-from Components.Pixmap import Pixmap
 from Screens.InputBox import InputBox, PinInput
 from Screens.MessageBox import MessageBox
 from Screens.ServiceInfo import ServiceInfo
@@ -112,6 +111,8 @@ class ChannelContextMenu(Screen):
                                        else:
                                                append_when_current_valid(current, menu, (_("add service to favourites"), self.addServiceToBouquetSelected), level = 0)
                                else:
+                                       if current_root.getPath().find('FROM SATELLITES') != -1:
+                                               append_when_current_valid(current, menu, (_("remove selected satellite"), self.removeSatelliteServices), level = 0)
                                        if haveBouquets:
                                                if not inBouquet and current_sel_path.find("PROVIDERS") == -1:
                                                        append_when_current_valid(current, menu, (_("copy to bouquets"), self.copyCurrentToBouquetList), level = 0)
@@ -205,6 +206,17 @@ class ChannelContextMenu(Screen):
                if recursive:
                        self.close(False)
 
+       def removeSatelliteServices(self):
+               curpath = self.csel.getCurrentSelection().getPath()
+               idx = curpath.find("satellitePosition == ")
+               if idx != -1:
+                       tmp = curpath[idx+21:]
+                       idx = tmp.find(')')
+                       if idx != -1:
+                               satpos = int(tmp[:idx])
+                               eDVBDB.getInstance().removeServices(-1, -1, -1, satpos)
+               self.close()
+
        def copyCurrentToBouquetList(self):
                self.csel.copyCurrentToBouquetList()
                self.close()
@@ -1358,6 +1370,11 @@ class ChannelSelectionRadio(ChannelSelectionBase, ChannelSelectionEdit, ChannelS
                },-1)
                self["RdsActions"].setEnabled(False)
                infobar.rds_display.onRassInteractivePossibilityChanged.append(self.RassInteractivePossibilityChanged)
+               self.onClose.append(self.__onClose)
+
+       def __onClose(self):
+               lastservice=eServiceReference(config.tv.lastservice.value)
+               self.session.nav.playService(lastservice)
 
        def startRassInteractive(self):
                self.info.hide();
@@ -1376,8 +1393,6 @@ class ChannelSelectionRadio(ChannelSelectionBase, ChannelSelectionEdit, ChannelS
                self.infobar.rds_display.onRassInteractivePossibilityChanged.remove(self.RassInteractivePossibilityChanged)
                self.info.hide()
                #set previous tv service
-               lastservice=eServiceReference(config.tv.lastservice.value)
-               self.session.nav.playService(lastservice)
                self.close(None)
 
        def __evServiceStart(self):