From: Stefan Pluecken Date: Tue, 10 Nov 2009 15:35:00 +0000 (+0100) Subject: fixes bug #281 X-Git-Tag: 3.0.0~28^2~66^2~196 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/58d96b9ff49080139dbe98546a7fe78953fca987 fixes bug #281 add "yes to all" and "no to all" to "Delete no more configured satellite" dialog if orbpos isn't needed anymore in current sat config --- diff --git a/lib/python/Screens/Satconfig.py b/lib/python/Screens/Satconfig.py index 8b5089a3..e24e4636 100644 --- a/lib/python/Screens/Satconfig.py +++ b/lib/python/Screens/Satconfig.py @@ -8,6 +8,7 @@ from Components.NimManager import nimmanager from Components.config import getConfigListEntry, config, ConfigNothing, ConfigSelection, updateConfigElement from Components.Sources.List import List from Screens.MessageBox import MessageBox +from Screens.ChoiceBox import ChoiceBox from time import mktime, localtime from datetime import datetime @@ -342,10 +343,10 @@ class NimSetup(Screen, ConfigListScreen): new_configured_sats = nimmanager.getConfiguredSats() self.unconfed_sats = old_configured_sats - new_configured_sats self.satpos_to_remove = None - self.deleteConfirmed(False) + self.deleteConfirmed((None, "no")) def deleteConfirmed(self, confirmed): - if confirmed: + if confirmed[1] == "yes" or confirmed[1] == "yestoall": eDVBDB.getInstance().removeServices(-1, -1, -1, self.satpos_to_remove) if self.satpos_to_remove is not None: @@ -365,11 +366,15 @@ class NimSetup(Screen, ConfigListScreen): else: h = _("E") sat_name = ("%d.%d" + h) % (orbpos / 10, orbpos % 10) - self.session.openWithCallback(self.deleteConfirmed, MessageBox, _("Delete no more configured satellite\n%s?") %(sat_name)) + + if confirmed[1] == "yes" or confirmed[1] == "no": + self.session.openWithCallback(self.deleteConfirmed, ChoiceBox, _("Delete no more configured satellite\n%s?") %(sat_name), [(_("Yes"), "yes"), (_("No"), "no"), (_("Yes to all"), "yestoall"), (_("No to all"), "notoall")]) + if confirmed[1] == "yestoall" or confirmed[1] == "notoall": + self.deleteConfirmed(confirmed) break if not self.satpos_to_remove: self.close() - + def __init__(self, session, slotid): Screen.__init__(self, session) self.list = [ ]