profile("VolumeControl")
#TODO .. move this to a own .py file
class VolumeControl:
+ instance = None
"""Volume control, handles volUp, volDown, volMute actions and display
a corresponding dialog"""
def __init__(self, session):
globalActionMap.actions["volumeDown"]=self.volDown
globalActionMap.actions["volumeMute"]=self.volMute
+ assert not VolumeControl.instance, "only one VolumeControl instance is allowed!"
+ VolumeControl.instance = self
+
config.audio = ConfigSubsection()
config.audio.volume = ConfigInteger(default = 100, limits = (0, 100))