fix Components movement
[enigma2-plugins.git] / webinterface / src / WebComponents / Converter / VolumeToText.py
1 from Components.Converter.Converter import Converter
2 from enigma import eDVBVolumecontrol #this is not nice
3 from Components.config import config
4
5 class VolumeToText(Converter, object):
6     
7     def __init__(self, type):
8         Converter.__init__(self, type)
9         self.volctrl = eDVBVolumecontrol.getInstance() # this is not nice
10         
11     def getHTML(self, id):
12         return self.getText() # encode & etc. here!
13     def getText(self):
14         r = "%s\n"%config.audio.volume.value
15         if self.volctrl.isMuted():
16             r+="muted"
17         else:
18             r+="notmuted"
19         return r
20         
21
22     text = property(getText)