From 5c7abd218e150060eae835fb7548052d738ca658 Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Sat, 31 Oct 2009 18:31:36 +0100 Subject: bug 154 remove sleep timer from infobar blue button menu sleep timer still accessible through powerdown menu via main menu or by holding the power button for 3 seconds --- lib/python/Screens/InfoBar.py | 6 +++--- lib/python/Screens/InfoBarGenerics.py | 12 ------------ 2 files changed, 3 insertions(+), 15 deletions(-) (limited to 'lib/python/Screens') diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py index d65eace8..59cc21d3 100644 --- a/lib/python/Screens/InfoBar.py +++ b/lib/python/Screens/InfoBar.py @@ -16,7 +16,7 @@ from Screens.InfoBarGenerics import InfoBarShowHide, \ InfoBarSubserviceSelection, InfoBarShowMovies, InfoBarTimeshift, \ InfoBarServiceNotifications, InfoBarPVRState, InfoBarCueSheetSupport, InfoBarSimpleEventView, \ InfoBarSummarySupport, InfoBarMoviePlayerSummarySupport, InfoBarTimeshiftState, InfoBarTeletextPlugin, InfoBarExtensions, \ - InfoBarSubtitleSupport, InfoBarPiP, InfoBarPlugins, InfoBarSleepTimer, InfoBarServiceErrorPopupSupport, InfoBarJobman + InfoBarSubtitleSupport, InfoBarPiP, InfoBarPlugins, InfoBarServiceErrorPopupSupport, InfoBarJobman profile("LOAD:InitBar_Components") from Components.ActionMap import HelpableActionMap @@ -32,7 +32,7 @@ class InfoBar(InfoBarBase, InfoBarShowHide, HelpableScreen, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarSubserviceSelection, InfoBarTimeshift, InfoBarSeek, InfoBarSummarySupport, InfoBarTimeshiftState, InfoBarTeletextPlugin, InfoBarExtensions, - InfoBarPiP, InfoBarPlugins, InfoBarSubtitleSupport, InfoBarSleepTimer, InfoBarServiceErrorPopupSupport, InfoBarJobman, + InfoBarPiP, InfoBarPlugins, InfoBarSubtitleSupport, InfoBarServiceErrorPopupSupport, InfoBarJobman, Screen): ALLOW_SUSPEND = True @@ -56,7 +56,7 @@ class InfoBar(InfoBarBase, InfoBarShowHide, InfoBarAdditionalInfo, InfoBarNotifications, InfoBarDish, InfoBarSubserviceSelection, \ InfoBarTimeshift, InfoBarSeek, InfoBarSummarySupport, InfoBarTimeshiftState, \ InfoBarTeletextPlugin, InfoBarExtensions, InfoBarPiP, InfoBarSubtitleSupport, InfoBarJobman, \ - InfoBarSleepTimer, InfoBarPlugins, InfoBarServiceErrorPopupSupport: + InfoBarPlugins, InfoBarServiceErrorPopupSupport: x.__init__(self) self.helpList.append((self["actions"], "InfobarActions", [("showMovies", _("view recordings..."))])) diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index 2f830616..2cbfeb73 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -24,7 +24,6 @@ from Screens.TimerSelection import TimerSelection from Screens.PictureInPicture import PictureInPicture from Screens.SubtitleDisplay import SubtitleDisplay from Screens.RdsDisplay import RdsInfoDisplay, RassInteractive -from Screens.SleepTimerEdit import SleepTimerEdit from Screens.TimeDateInput import TimeDateInput from ServiceReference import ServiceReference @@ -1356,17 +1355,6 @@ class InfoBarJobman: def JobViewCB(self, in_background): job_manager.in_background = in_background -# depends on InfoBarExtensions -class InfoBarSleepTimer: - def __init__(self): - self.addExtension((self.getSleepTimerName, self.showSleepTimerSetup, lambda: True), "1") - - def getSleepTimerName(self): - return _("Sleep Timer") - - def showSleepTimerSetup(self): - self.session.open(SleepTimerEdit) - # depends on InfoBarExtensions class InfoBarPiP: def __init__(self): -- cgit v1.2.3 From d66c36f6534f32c7362c45965051cf84ccf84ba9 Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Fri, 6 Nov 2009 16:23:29 +0100 Subject: fixes bug #258 removed some wrong ConfigSatList handling --- lib/python/Components/NimManager.py | 8 ++++---- lib/python/Components/config.py | 12 +++++++++++- lib/python/Screens/ScanSetup.py | 5 ++--- 3 files changed, 17 insertions(+), 8 deletions(-) (limited to 'lib/python/Screens') diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 5154e2b0..47325327 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -799,15 +799,15 @@ class NimManager: dm = nim.diseqcMode.value if dm in ("single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"): if nim.diseqcA.orbital_position != 3601: - list.append(self.satList[nim.diseqcA.index-1]) + list.append(nim.diseqcA.getSat()) if dm in ("toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"): if nim.diseqcB.orbital_position != 3601: - list.append(self.satList[nim.diseqcB.index-1]) + list.append(nim.diseqcB.getSat()) if dm == "diseqc_a_b_c_d": if nim.diseqcC.orbital_position != 3601: - list.append(self.satList[nim.diseqcC.index-1]) + list.append(nim.diseqcC.getSat()) if nim.diseqcD.orbital_position != 3601: - list.append(self.satList[nim.diseqcD.index-1]) + list.append(nim.diseqcD.getSat()) if dm == "positioner": for x in self.satList: list.append(x) diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index 49501f95..cf2c5e29 100755 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -1148,15 +1148,25 @@ class ConfigSatlist(ConfigSelection): def __init__(self, list, default = None): if default is not None: default = str(default) + list.sort(key = lambda x: int(x[0])) + self._satList = list choices = [(str(orbpos), desc) for (orbpos, desc, flags) in list] - choices.sort(key = lambda x: int(x[0])) ConfigSelection.__init__(self, choices = choices, default = default) + # use this function to get the orbital position, don't rely on .index def getOrbitalPosition(self): if self.value == "": return None return int(self.value) + + def getSatList(self): + return self._satList + + def getSat(self): + return self.satList[self.index] + + satList = property(getSatList) orbital_position = property(getOrbitalPosition) diff --git a/lib/python/Screens/ScanSetup.py b/lib/python/Screens/ScanSetup.py index d0af8f7e..aed90268 100644 --- a/lib/python/Screens/ScanSetup.py +++ b/lib/python/Screens/ScanSetup.py @@ -729,11 +729,10 @@ class ScanSetup(ConfigListScreen, Screen, CableTransponderSearchSupport): assert len(self.scan_satselection) > index_to_scan nimsats = self.satList[index_to_scan] - selsatidx = self.scan_satselection[index_to_scan].index + orbpos = self.scan_satselection[index_to_scan].getOrbitalPosition() # however, the satList itself could be empty. in that case, "index" is 0 (for "None"). if len(nimsats): - orbpos = nimsats[selsatidx][0] if self.scan_sat.system.value == eDVBFrontendParametersSatellite.System_DVB_S: fec = self.scan_sat.fec.value else: @@ -751,7 +750,7 @@ class ScanSetup(ConfigListScreen, Screen, CableTransponderSearchSupport): self.scan_sat.pilot.value) removeAll = False elif self.scan_type.value == "single_satellite": - sat = self.satList[index_to_scan][self.scan_satselection[index_to_scan].index] + sat = self.scan_satselection[index_to_scan].getSat() getInitialTransponderList(tlist, sat[0]) elif self.scan_type.value.find("multisat") != -1: SatList = nimmanager.getSatListForNim(index_to_scan) -- cgit v1.2.3 From 513239a74d5abdc0c22fdd8d4dcb892703ef8c27 Mon Sep 17 00:00:00 2001 From: ghost Date: Sat, 7 Nov 2009 14:26:34 +0100 Subject: revert some no more needed bug_258_sorting_of_configsatlist changes --- lib/python/Components/NimManager.py | 8 ++++---- lib/python/Components/config.py | 14 +------------- lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py | 4 ++-- lib/python/Screens/ScanSetup.py | 5 +++-- 4 files changed, 10 insertions(+), 21 deletions(-) (limited to 'lib/python/Screens') diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 1dff777a..8d6cff16 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -800,15 +800,15 @@ class NimManager: dm = nim.diseqcMode.value if dm in ("single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"): if nim.diseqcA.orbital_position != 3601: - list.append(nim.diseqcA.getSat()) + list.append(self.satList[nim.diseqcA.index-1]) if dm in ("toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"): if nim.diseqcB.orbital_position != 3601: - list.append(nim.diseqcB.getSat()) + list.append(self.satList[nim.diseqcB.index-1]) if dm == "diseqc_a_b_c_d": if nim.diseqcC.orbital_position != 3601: - list.append(nim.diseqcC.getSat()) + list.append(self.satList[nim.diseqcC.index-1]) if nim.diseqcD.orbital_position != 3601: - list.append(nim.diseqcD.getSat()) + list.append(self.satList[nim.diseqcD.index-1]) if dm == "positioner": for x in self.satList: list.append(x) diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index baa6c35b..e249caf4 100755 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -1148,24 +1148,12 @@ class ConfigSatlist(ConfigSelection): def __init__(self, list, default = None): if default is not None: default = str(default) - self._satList = list - choices = [(str(orbpos), desc) for (orbpos, desc, flags) in list] - - ConfigSelection.__init__(self, choices = choices, default = default) + ConfigSelection.__init__(self, choices = [(str(orbpos), desc) for (orbpos, desc, flags) in list], default = default) - # use this function to get the orbital position, don't rely on .index def getOrbitalPosition(self): if self.value == "": return None return int(self.value) - - def getSatList(self): - return self._satList - - def getSat(self): - return self.satList[self.index] - - satList = property(getSatList) orbital_position = property(getOrbitalPosition) diff --git a/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py b/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py index ea62550b..fa533c0b 100644 --- a/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py +++ b/lib/python/Plugins/SystemPlugins/PositionerSetup/plugin.py @@ -484,8 +484,8 @@ class TunerScreen(ScanSetup): self.updateTransponders() def updateTransponders(self): - if len(tuning.sat.satList): - transponderlist = nimmanager.getTransponders(tuning.sat.orbital_position) + if len(tuning.sat.choices): + transponderlist = nimmanager.getTransponders(int(tuning.sat.value)) tps = [] cnt=0 for x in transponderlist: diff --git a/lib/python/Screens/ScanSetup.py b/lib/python/Screens/ScanSetup.py index aed90268..d0af8f7e 100644 --- a/lib/python/Screens/ScanSetup.py +++ b/lib/python/Screens/ScanSetup.py @@ -729,10 +729,11 @@ class ScanSetup(ConfigListScreen, Screen, CableTransponderSearchSupport): assert len(self.scan_satselection) > index_to_scan nimsats = self.satList[index_to_scan] - orbpos = self.scan_satselection[index_to_scan].getOrbitalPosition() + selsatidx = self.scan_satselection[index_to_scan].index # however, the satList itself could be empty. in that case, "index" is 0 (for "None"). if len(nimsats): + orbpos = nimsats[selsatidx][0] if self.scan_sat.system.value == eDVBFrontendParametersSatellite.System_DVB_S: fec = self.scan_sat.fec.value else: @@ -750,7 +751,7 @@ class ScanSetup(ConfigListScreen, Screen, CableTransponderSearchSupport): self.scan_sat.pilot.value) removeAll = False elif self.scan_type.value == "single_satellite": - sat = self.scan_satselection[index_to_scan].getSat() + sat = self.satList[index_to_scan][self.scan_satselection[index_to_scan].index] getInitialTransponderList(tlist, sat[0]) elif self.scan_type.value.find("multisat") != -1: SatList = nimmanager.getSatListForNim(index_to_scan) -- cgit v1.2.3 From c278f726f27c5645569c407a71ac972363600ae8 Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Sat, 7 Nov 2009 12:43:22 +0100 Subject: fixes bug #283 if nothing is connected to any nim, don't die entering scan setup --- data/skin_default.xml | 4 ++-- lib/python/Screens/ScanSetup.py | 10 +++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'lib/python/Screens') diff --git a/data/skin_default.xml b/data/skin_default.xml index 72dc3577..16504abf 100755 --- a/data/skin_default.xml +++ b/data/skin_default.xml @@ -803,9 +803,9 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y())) - + - + diff --git a/lib/python/Screens/ScanSetup.py b/lib/python/Screens/ScanSetup.py index d0af8f7e..bea08724 100644 --- a/lib/python/Screens/ScanSetup.py +++ b/lib/python/Screens/ScanSetup.py @@ -295,9 +295,11 @@ class ScanSetup(ConfigListScreen, Screen, CableTransponderSearchSupport): self.list = [] ConfigListScreen.__init__(self, self.list) - self.createSetup() - - self["introduction"] = Label(_("Press OK to start the scan")) + if not self.scan_nims.value == "": + self.createSetup() + self["introduction"] = Label(_("Press OK to start the scan")) + else: + self["introduction"] = Label(_("Nothing to scan!\nPlease setup your tuner settings before you start a service scan.")) def runAsync(self, finished_cb): self.finished_cb = finished_cb @@ -709,6 +711,8 @@ class ScanSetup(ConfigListScreen, Screen, CableTransponderSearchSupport): tlist.append(buildTerTransponder(*args, **kwargs)) def keyGo(self): + if self.scan_nims.value == "": + return tlist = [] flags = None startScan = True -- cgit v1.2.3