X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/ed40f6f85c9c07c3c1224ae20601082c0309a631..87b1a41106c4561a400536558d10dc703b3f81f4:/lib/python/Screens/InputBox.py diff --git a/lib/python/Screens/InputBox.py b/lib/python/Screens/InputBox.py index 6cdb42ee..fe21ea0a 100644 --- a/lib/python/Screens/InputBox.py +++ b/lib/python/Screens/InputBox.py @@ -22,7 +22,6 @@ class InputBox(Screen): "back": self.cancel, "left": self.keyLeft, "right": self.keyRight, - "delete": self.keyDelete, "moveLeft": self.keyLeft, "moveRight": self.keyRight, "moveHome": self.keyHome, @@ -88,7 +87,7 @@ class InputBox(Screen): class PinInput(InputBox): def __init__(self, session, service = "", triesEntry = None, pinList = [], *args, **kwargs): - InputBox.__init__(self, session = session, text="9876", maxSize=True, type=Input.PIN, *args, **kwargs) + InputBox.__init__(self, session = session, text=" ", maxSize=True, type=Input.PIN, *args, **kwargs) self.waitTime = 15 @@ -109,6 +108,13 @@ class PinInput(InputBox): self["tries"] = Label("") self.onShown.append(self.showTries) + def gotAsciiCode(self): + if self["input"].currPos == len(self["input"]) - 1: + InputBox.gotAsciiCode(self) + self.go() + else: + InputBox.gotAsciiCode(self) + def keyNumberGlobal(self, number): if self["input"].currPos == len(self["input"]) - 1: InputBox.keyNumberGlobal(self, number) @@ -117,7 +123,7 @@ class PinInput(InputBox): InputBox.keyNumberGlobal(self, number) def checkPin(self, pin): - if pin is not None and int(pin) in self.pinList: + if pin is not None and pin.find(" ") == -1 and int(pin) in self.pinList: return True return False @@ -136,18 +142,22 @@ class PinInput(InputBox): pass def closePinWrong(self, *args): + rcinput = eRCInput.getInstance() + rcinput.setKeyboardMode(rcinput.kmNone) print "args:", args self.close(False) def closePinCorrect(self, *args): + rcinput = eRCInput.getInstance() + rcinput.setKeyboardMode(rcinput.kmNone) self.close(True) def closePinCancel(self, *args): + rcinput = eRCInput.getInstance() + rcinput.setKeyboardMode(rcinput.kmNone) self.close(None) def cancel(self): - rcinput = eRCInput.getInstance() - rcinput.setKeyboardMode(rcinput.kmNone) self.closePinCancel() def getTries(self):