aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2005-05-20 20:15:14 +0000
committerFelix Domke <tmbinc@elitedvb.net>2005-05-20 20:15:14 +0000
commit823e8897d98c90e114bf68c9af754c72fdd9d411 (patch)
treeb1b24c9797cb130ea115cf11cc571a639df46ec2 /lib/python
parent60e5fe14d01b84bbef35d5286183a85ff72002dd (diff)
downloadenigma2-823e8897d98c90e114bf68c9af754c72fdd9d411.tar.gz
enigma2-823e8897d98c90e114bf68c9af754c72fdd9d411.zip
- add missing TextInput component
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Components/TextInput.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/python/Components/TextInput.py b/lib/python/Components/TextInput.py
new file mode 100644
index 00000000..98b440c5
--- /dev/null
+++ b/lib/python/Components/TextInput.py
@@ -0,0 +1,31 @@
+from HTMLComponent import *
+from GUIComponent import *
+
+from tools import CONNECT, DISCONNECT
+
+from enigma import eInput, eInputContentString
+
+class TextInput(HTMLComponent, GUIComponent):
+ def __init__(self):
+ GUIComponent.__init__(self)
+ self.content = eInputContentString()
+
+ def contentChanged(self):
+ print "content changed to %s!" % (self.getText())
+
+ def getText(self):
+ return self.content.getText()
+
+ def setText(self, text):
+ # TODO : support unicode!
+ self.content.setText(str(text))
+
+ def GUIcreate(self, parent, skindata):
+ self.instance = eInput(parent)
+ CONNECT(self.instance.changed, self.contentChanged)
+ self.instance.setContent(self.content)
+
+ def GUIdelete(self):
+ DISCONNECT(self.instance.changed, self.contentChanged)
+ self.instance.setContent(None)
+ self.instance = None