diff options
| author | ghost <andreas.monzner@multimedia-labs.de> | 2008-12-16 21:37:14 +0100 |
|---|---|---|
| committer | ghost <andreas.monzner@multimedia-labs.de> | 2008-12-16 21:37:14 +0100 |
| commit | 2aa2925cf52add4b737c17a7e75c88a4fcc7057c (patch) | |
| tree | ded07671f60bffc771b12e458b7b684ba44bf308 /lib/python/Screens | |
| parent | 91e9098bb54966e20ed240d127a9c946065cd5ab (diff) | |
| parent | b10857da7a1853f816adcb2c0464e9c759190c26 (diff) | |
| download | enigma2-2aa2925cf52add4b737c17a7e75c88a4fcc7057c.tar.gz enigma2-2aa2925cf52add4b737c17a7e75c88a4fcc7057c.zip | |
Merge branch 'master' of git.opendreambox.org:/git/enigma2
Diffstat (limited to 'lib/python/Screens')
| -rwxr-xr-x | lib/python/Screens/Makefile.am | 3 | ||||
| -rw-r--r-- | lib/python/Screens/Satconfig.py | 88 | ||||
| -rw-r--r-- | lib/python/Screens/TextBox.py | 26 |
3 files changed, 77 insertions, 40 deletions
diff --git a/lib/python/Screens/Makefile.am b/lib/python/Screens/Makefile.am index a3cf70bb..cde2d6c3 100755 --- a/lib/python/Screens/Makefile.am +++ b/lib/python/Screens/Makefile.am @@ -13,5 +13,6 @@ install_PYTHON = \ TimerSelection.py PictureInPicture.py TimeDateInput.py \ SubtitleDisplay.py SubservicesQuickzap.py ParentalControlSetup.py NumericalTextInputHelpDialog.py \ SleepTimerEdit.py Ipkg.py RdsDisplay.py Globals.py DefaultWizard.py \ - SessionGlobals.py LocationBox.py WizardLanguage.py TaskView.py Rc.py VirtualKeyBoard.py + SessionGlobals.py LocationBox.py WizardLanguage.py TaskView.py Rc.py VirtualKeyBoard.py \ + TextBox.py diff --git a/lib/python/Screens/Satconfig.py b/lib/python/Screens/Satconfig.py index 5628926f..320bea84 100644 --- a/lib/python/Screens/Satconfig.py +++ b/lib/python/Screens/Satconfig.py @@ -384,18 +384,26 @@ class NimSelection(Screen): self.list = [None] * nimmanager.getSlotCount() self["nimlist"] = List(self.list) self.updateList() + + self.setResultClass() self["actions"] = ActionMap(["OkCancelActions"], { "ok": self.okbuttonClick , "cancel": self.close }, -2) + + def setResultClass(self): + self.resultclass = NimSetup def okbuttonClick(self): nim = self["nimlist"].getCurrent() nim = nim and nim[3] if nim is not None and not nim.empty: - self.session.openWithCallback(self.updateList, NimSetup, nim.slot) + self.session.openWithCallback(self.updateList, self.resultclass, nim.slot) + + def showNim(self, nim): + return True def updateList(self): self.list = [ ] @@ -403,42 +411,44 @@ class NimSelection(Screen): slotid = x.slot nimConfig = nimmanager.getNimConfig(x.slot) text = nimConfig.configMode.value - if x.isCompatible("DVB-S"): - if nimConfig.configMode.value in ["loopthrough", "equal", "satposdepends"]: - text = { "loopthrough": _("loopthrough to"), - "equal": _("equal to"), - "satposdepends": _("second cable of motorized LNB") } [nimConfig.configMode.value] - text += " " + _("Tuner") + " " + ["A", "B", "C", "D"][int(nimConfig.connectedTo.value)] - elif nimConfig.configMode.value == "nothing": - text = _("nothing connected") - elif nimConfig.configMode.value == "simple": - if nimConfig.diseqcMode.value in ["single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"]: - text = _("Sats") + ": " - if nimConfig.diseqcA.orbital_position != 3601: - text += nimmanager.getSatName(int(nimConfig.diseqcA.value)) - if nimConfig.diseqcMode.value in ["toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"]: - if nimConfig.diseqcB.orbital_position != 3601: - text += "," + nimmanager.getSatName(int(nimConfig.diseqcB.value)) - if nimConfig.diseqcMode.value == "diseqc_a_b_c_d": - if nimConfig.diseqcC.orbital_position != 3601: - text += "," + nimmanager.getSatName(int(nimConfig.diseqcC.value)) - if nimConfig.diseqcD.orbital_position != 3601: - text += "," + nimmanager.getSatName(int(nimConfig.diseqcD.value)) - elif nimConfig.diseqcMode.value == "positioner": - text = _("Positioner") + ":" - if nimConfig.positionerMode.value == "usals": - text += _("USALS") - elif nimConfig.positionerMode.value == "manual": - text += _("manual") - else: - text = _("simple") - elif nimConfig.configMode.value == "advanced": - text = _("advanced") - elif x.isCompatible("DVB-T") or x.isCompatible("DVB-C"): - if nimConfig.configMode.value == "nothing": - text = _("nothing connected") - elif nimConfig.configMode.value == "enabled": - text = _("enabled") - - self.list.append((slotid, x.friendly_full_description, text, x)) + if self.showNim(x): + if x.isCompatible("DVB-S"): + if nimConfig.configMode.value in ["loopthrough", "equal", "satposdepends"]: + text = { "loopthrough": _("loopthrough to"), + "equal": _("equal to"), + "satposdepends": _("second cable of motorized LNB") } [nimConfig.configMode.value] + text += " " + _("Tuner") + " " + ["A", "B", "C", "D"][int(nimConfig.connectedTo.value)] + elif nimConfig.configMode.value == "nothing": + text = _("nothing connected") + elif nimConfig.configMode.value == "simple": + if nimConfig.diseqcMode.value in ["single", "toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"]: + text = _("Sats") + ": " + if nimConfig.diseqcA.orbital_position != 3601: + text += nimmanager.getSatName(int(nimConfig.diseqcA.value)) + if nimConfig.diseqcMode.value in ["toneburst_a_b", "diseqc_a_b", "diseqc_a_b_c_d"]: + if nimConfig.diseqcB.orbital_position != 3601: + text += "," + nimmanager.getSatName(int(nimConfig.diseqcB.value)) + if nimConfig.diseqcMode.value == "diseqc_a_b_c_d": + if nimConfig.diseqcC.orbital_position != 3601: + text += "," + nimmanager.getSatName(int(nimConfig.diseqcC.value)) + if nimConfig.diseqcD.orbital_position != 3601: + text += "," + nimmanager.getSatName(int(nimConfig.diseqcD.value)) + elif nimConfig.diseqcMode.value == "positioner": + text = _("Positioner") + ":" + if nimConfig.positionerMode.value == "usals": + text += _("USALS") + elif nimConfig.positionerMode.value == "manual": + text += _("manual") + else: + text = _("simple") + elif nimConfig.configMode.value == "advanced": + text = _("advanced") + elif x.isCompatible("DVB-T") or x.isCompatible("DVB-C"): + if nimConfig.configMode.value == "nothing": + text = _("nothing connected") + elif nimConfig.configMode.value == "enabled": + text = _("enabled") + + self.list.append((slotid, x.friendly_full_description, text, x)) + self["nimlist"].setList(self.list) self["nimlist"].updateList(self.list)
\ No newline at end of file diff --git a/lib/python/Screens/TextBox.py b/lib/python/Screens/TextBox.py new file mode 100644 index 00000000..44b8a3cf --- /dev/null +++ b/lib/python/Screens/TextBox.py @@ -0,0 +1,26 @@ +from Screens.Screen import Screen + +from Components.ActionMap import ActionMap +from Components.Sources.StaticText import StaticText +from Components.ScrollLabel import ScrollLabel + +class TextBox(Screen): + def __init__(self, session, text = ""): + Screen.__init__(self, session) + + self.text = text + self["text"] = ScrollLabel(self.text) + + self["actions"] = ActionMap(["OkCancelActions", "DirectionActions"], + { + "cancel": self.cancel, + "ok": self.ok, + "up": self["text"].pageUp, + "down": self["text"].pageDown, + }, -1) + + def ok(self): + self.close() + + def cancel(self): + self.close() |
