From 49b1d6023e84aa49b29bc0c0cd2e293b3a7e360c Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Sun, 15 Jan 2006 22:55:59 +0000 Subject: add a global ActionMap make volumeActions global --- lib/python/Screens/InfoBarGenerics.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'lib/python') diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index de12c093..a627cdb4 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -38,20 +38,21 @@ from Components.config import config, currentConfigSelectionElement # hack alert! from Menu import MainMenu, mdom +from GlobalActions import globalActionMap + class InfoBarVolumeControl: """Volume control, handles volUp, volDown, volMute actions and display a corresponding dialog""" + def __init__(self): + global globalActionMap + globalActionMap.actions["volumeUp"]=self.volUp + globalActionMap.actions["volumeDown"]=self.volDown + globalActionMap.actions["volumeMute"]=self.volMute + config.audio = ConfigSubsection() config.audio.volume = configElement("config.audio.volume", configSequence, [100], configsequencearg.get("INTEGER", (0, 100))) - self["VolumeActions"] = ActionMap( ["InfobarVolumeActions"] , - { - "volumeUp": self.volUp, - "volumeDown": self.volDown, - "volumeMute": self.volMute, - }) - self.volumeDialog = self.session.instantiateDialog(Volume) self.muteDialog = self.session.instantiateDialog(Mute) -- cgit v1.2.3