git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Enigma2-Network: update Wlan plugin to support new python-wifi.
[enigma2.git]
/
lib
/
python
/
Components
/
VariableText.py
diff --git
a/lib/python/Components/VariableText.py
b/lib/python/Components/VariableText.py
index e2a755c539f57b561ab081810aefb1cf7d0fff8f..c95330915c3af65b206df9f60308c65e436b1b4c 100644
(file)
--- a/
lib/python/Components/VariableText.py
+++ b/
lib/python/Components/VariableText.py
@@
-1,16
+1,15
@@
-import skin
-
-class VariableText:
+class VariableText(object):
"""VariableText can be used for components which have a variable text, based on any widget with setText call"""
def __init__(self):
"""VariableText can be used for components which have a variable text, based on any widget with setText call"""
def __init__(self):
+ object.__init__(self)
self.message = ""
self.instance = None
def setText(self, text):
self.message = text
if self.instance:
self.message = ""
self.instance = None
def setText(self, text):
self.message = text
if self.instance:
- self.instance.setText(self.message)
+ self.instance.setText(self.message
or ""
)
def setMarkedPos(self, pos):
if self.instance:
def setMarkedPos(self, pos):
if self.instance:
@@
-19,14
+18,7
@@
class VariableText:
def getText(self):
return self.message
def getText(self):
return self.message
- def GUIcreate(self, parent):
- self.instance = self.createWidget(parent)
- self.instance.setText(self.message)
-
- def GUIdelete(self):
- self.removeWidget(self.instance)
- self.instance = None
+ text = property(getText, setText)
- def removeWidget(self, instance):
- pass
-
+ def postWidgetCreate(self, instance):
+ instance.setText(self.message or "")