X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fpython%2FComponents%2FVolumeControl.py;h=38102926ace9bdded3ba3be6508878c6747594a2;hp=19fb90d7df8123dea8b7ffbbbb2edc79eb2d27ae;hb=0a62b65175152c42976d4cb04fb7026d9f910915;hpb=19d19912b3f7ff117f4f9e8136c428b664d806cb diff --git a/lib/python/Components/VolumeControl.py b/lib/python/Components/VolumeControl.py index 19fb90d..3810292 100644 --- a/lib/python/Components/VolumeControl.py +++ b/lib/python/Components/VolumeControl.py @@ -8,6 +8,7 @@ from config import config, ConfigSubsection, ConfigInteger 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): @@ -16,6 +17,9 @@ class VolumeControl: 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))