aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2008-04-14 23:28:10 +0000
committerFelix Domke <tmbinc@elitedvb.net>2008-04-14 23:28:10 +0000
commit82b8e6eff15ed9d3b6644fdc9ac655fcc35acd9d (patch)
tree23478dd594211f66ad83f73930987e2e5facaeb3 /lib/python/Components
parentbf52e20ac1d227427cddfdef1437e33a55ab502b (diff)
downloadenigma2-82b8e6eff15ed9d3b6644fdc9ac655fcc35acd9d.tar.gz
enigma2-82b8e6eff15ed9d3b6644fdc9ac655fcc35acd9d.zip
emit changed when text changes (not so static anymore)
Diffstat (limited to 'lib/python/Components')
-rw-r--r--lib/python/Components/Sources/StaticText.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/python/Components/Sources/StaticText.py b/lib/python/Components/Sources/StaticText.py
index 6f775c44..8e6f824e 100644
--- a/lib/python/Components/Sources/StaticText.py
+++ b/lib/python/Components/Sources/StaticText.py
@@ -3,13 +3,22 @@ from Source import Source
class StaticText(Source):
# filter is a function which filters external, untrusted strings
# this must be done to avoid XSS attacks!
-
+
# (and is probably not done yet. For this reason, be careful when
# using this on HTML pages. *DO* provide your filter function.)
def __init__(self, text = "", filter = lambda x: x):
Source.__init__(self)
- self.text = text
+ self.__text = text
self.filter = filter
def handleCommand(self, cmd):
self.text = self.filter(cmd)
+
+ def getText(self):
+ return self.__text
+
+ def setText(self, text):
+ self.__text = text
+ self.changed((self.CHANGED_ALL,))
+
+ text = property(getText, setText)