X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fpython%2FScreens%2FInputBox.py;h=61ce356aa724aa32cee7a8acabe7a80805d74137;hp=455cad9bf500c383d08b0f47d92efceaba91cdda;hb=f5f419866f81d7c356c633acdb39c9da91c3377c;hpb=4514d25acd99a7f79890ae62d11ee1adfc36bf58 diff --git a/lib/python/Screens/InputBox.py b/lib/python/Screens/InputBox.py index 455cad9..61ce356 100644 --- a/lib/python/Screens/InputBox.py +++ b/lib/python/Screens/InputBox.py @@ -8,12 +8,14 @@ from Tools.BoundFunction import boundFunction from time import time class InputBox(Screen): - def __init__(self, session, title = "", windowTitle = _("Input"), **kwargs): + def __init__(self, session, title = "", windowTitle = _("Input"), useableChars = None, **kwargs): Screen.__init__(self, session) self["text"] = Label(title) self["input"] = Input(**kwargs) self.onShown.append(boundFunction(self.setTitle, windowTitle)) + if useableChars is not None: + self["input"].setUseableChars(useableChars) self["actions"] = NumberActionMap(["WizardActions", "InputBoxActions", "InputAsciiActions", "KeyboardInputActions"], { @@ -99,7 +101,7 @@ class PinInput(InputBox): remaining = (self.triesEntry.time.value + (self.waitTime * 60)) - time() remainingMinutes = int(remaining / 60) remainingSeconds = int(remaining % 60) - self.onFirstExecBegin.append(boundFunction(self.session.openWithCallback, self.closePinCancel, MessageBox, _("You have to wait %s!") % (str(remainingMinutes) + " " + _("minutes") + ", " + str(remainingSeconds) + " " + _("seconds"), MessageBox.TYPE_ERROR))) + self.onFirstExecBegin.append(boundFunction(self.session.openWithCallback, self.closePinCancel, MessageBox, _("You have to wait %s!") % (str(remainingMinutes) + " " + _("minutes") + ", " + str(remainingSeconds) + " " + _("seconds")), MessageBox.TYPE_ERROR)) else: self.setTries(3)