git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove debug
[enigma2.git]
/
lib
/
python
/
Components
/
Input.py
diff --git
a/lib/python/Components/Input.py
b/lib/python/Components/Input.py
index e7713d6db9ee73c4144267d4bba7c2bfad992413..b30a74e4cc2b3e5d8815373168e4d5a33ae52fa1 100644
(file)
--- a/
lib/python/Components/Input.py
+++ b/
lib/python/Components/Input.py
@@
-6,20
+6,23
@@
from enigma import eLabel
from Tools.NumericalTextInput import NumericalTextInput
from Tools.NumericalTextInput import NumericalTextInput
-class Input(VariableText, HTMLComponent, GUIComponent):
+class Input(VariableText, HTMLComponent, GUIComponent
, NumericalTextInput
):
TEXT = 0
PIN = 1
NUMBER = 2
def __init__(self, text="", maxSize = False, type = TEXT):
TEXT = 0
PIN = 1
NUMBER = 2
def __init__(self, text="", maxSize = False, type = TEXT):
+ NumericalTextInput.__init__(self, self.right)
GUIComponent.__init__(self)
VariableText.__init__(self)
self.type = type
self.maxSize = maxSize
self.currPos = 0
self.overwrite = 0
GUIComponent.__init__(self)
VariableText.__init__(self)
self.type = type
self.maxSize = maxSize
self.currPos = 0
self.overwrite = 0
- self.numericalTextInput = NumericalTextInput(self.right)
self.setText(text)
self.setText(text)
+
+ def __len__(self):
+ return len(self.text)
def update(self):
self.setMarkedPos(self.currPos)
def update(self):
self.setMarkedPos(self.currPos)
@@
-122,7
+125,7
@@
class Input(VariableText, HTMLComponent, GUIComponent):
def number(self, number):
if self.type == self.TEXT:
def number(self, number):
if self.type == self.TEXT:
- newChar = self.
numericalTextInput.
getKey(number)
+ newChar = self.getKey(number)
elif self.type == self.PIN or self.type == self.NUMBER:
newChar = str(number)
self.Text = self.Text[0:self.currPos] + newChar + self.Text[self.currPos + 1:]
elif self.type == self.PIN or self.type == self.NUMBER:
newChar = str(number)
self.Text = self.Text[0:self.currPos] + newChar + self.Text[self.currPos + 1:]