diff options
Diffstat (limited to 'lib/python/Components/VolumeControl.py')
| -rw-r--r-- | lib/python/Components/VolumeControl.py | 4 |
1 files changed, 4 insertions, 0 deletions
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)) |
