X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/19d19912b3f7ff117f4f9e8136c428b664d806cb..8916a028519e706f6b7764839e1adc1d25eddac1:/lib/python/Components/VolumeControl.py diff --git a/lib/python/Components/VolumeControl.py b/lib/python/Components/VolumeControl.py index 19fb90d7..38102926 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))