rename Components -> WebComponents
[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
4 class VolumeToText(Converter, object):
5     
6     def __init__(self, type):
7         Converter.__init__(self, type)
8         self.volctrl = eDVBVolumecontrol.getInstance() # this is not nice
9         
10     def getHTML(self, id):
11         return self.getText() # encode & etc. here!
12     def getText(self):
13         r = "%s\n"%config.audio.volume.value
14         if self.volctrl.isMuted():
15             r+="muted"
16         else:
17             r+="notmuted"
18         return r
19         
20
21     text = property(getText)