fix inverted setting (meaning was inverted too)
[enigma2.git] / lib / python / Components / VariableText.py
1 import skin
2
3 class VariableText:
4         """VariableText can be used for components which have a variable text, based on any widget with setText call"""
5         
6         def __init__(self):
7                 self.message = ""
8                 self.instance = None
9         
10         def setText(self, text):
11                 self.message = text
12                 if self.instance:
13                         self.instance.setText(self.message)
14
15         def setMarkedPos(self, pos):
16                 if self.instance:
17                         self.instance.setMarkedPos(int(pos))
18
19         def getText(self):
20                 return self.message
21         
22         def GUIcreate(self, parent):
23                 self.instance = self.createWidget(parent)
24                 self.instance.setText(self.message)
25         
26         def GUIdelete(self):
27                 self.removeWidget(self.instance)
28                 self.instance = None
29         
30         def removeWidget(self, instance):
31                 pass
32