diff options
| author | ghost <andreas.monzner@multimedia-labs.de> | 2010-08-05 11:15:00 +0200 |
|---|---|---|
| committer | ghost <andreas.monzner@multimedia-labs.de> | 2010-08-05 11:15:16 +0200 |
| commit | 83ca71426637db994d49662a00f1388ba6394dca (patch) | |
| tree | 5feb3f3e9b9cd50f6bd86a8a92e9ecfba3ed210b /lib/python | |
| parent | ba702c42bfa54324396f2ef9c61d0bbe4a8a135b (diff) | |
| download | enigma2-83ca71426637db994d49662a00f1388ba6394dca.tar.gz enigma2-83ca71426637db994d49662a00f1388ba6394dca.zip | |
lib/python/Components/VolumeControl.py: move instance to class
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Components/VolumeControl.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/python/Components/VolumeControl.py b/lib/python/Components/VolumeControl.py index eef74d0e..38102926 100644 --- a/lib/python/Components/VolumeControl.py +++ b/lib/python/Components/VolumeControl.py @@ -5,22 +5,20 @@ from Screens.Mute import Mute from GlobalActions import globalActionMap from config import config, ConfigSubsection, ConfigInteger -instance = None - 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): global globalActionMap - global instance globalActionMap.actions["volumeUp"]=self.volUp globalActionMap.actions["volumeDown"]=self.volDown globalActionMap.actions["volumeMute"]=self.volMute - assert not instance, "only one VolumeControl instance is allowed!" - instance = self + 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)) |
