X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fpython%2FComponents%2FVariableText.py;h=bb8b5fe326e96f1f8f5898f1812293df0c58a288;hb=5f1f993d0e82bb8f5471bf050e97077f67c3d853;hp=694355e7fa7bd7d5c6099eebfe2941b494105c58;hpb=aa3e781f31a04223416f0a34b25ab95fc0bef429;p=vuplus_dvbapp diff --git a/lib/python/Components/VariableText.py b/lib/python/Components/VariableText.py index 694355e..bb8b5fe 100644 --- a/lib/python/Components/VariableText.py +++ b/lib/python/Components/VariableText.py @@ -1,7 +1,10 @@ -class VariableText: +import skin + +class VariableText(object): """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 @@ -10,17 +13,14 @@ class VariableText: if self.instance: self.instance.setText(self.message) + def setMarkedPos(self, pos): + if self.instance: + self.instance.setMarkedPos(int(pos)) + def getText(self): return self.message - def GUIcreate(self, parent, skindata): - self.instance = self.createWidget(parent, skindata) - self.instance.setText(self.message) + text = property(getText, setText) - def GUIdelete(self): - self.removeWidget(self.instance) - self.instance = None - - def removeWidget(self, instance): - pass - + def postWidgetCreate(self, instance): + instance.setText(self.message)