From 7f56f0647d4cb7e1ea77fca1af0d8c5999e5d880 Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Thu, 10 Nov 2005 02:08:03 +0000 Subject: [PATCH] use mute.png for volume muting --- data/skin.xml | 5 ++++- lib/python/Screens/InfoBar.py | 12 ++++++++---- lib/python/Screens/Makefile.am | 2 +- lib/python/Screens/Mute.py | 7 +++++++ lib/python/Screens/__init__.py | 2 +- 5 files changed, 21 insertions(+), 7 deletions(-) create mode 100644 lib/python/Screens/Mute.py diff --git a/data/skin.xml b/data/skin.xml index c1b9aa94..c449723f 100644 --- a/data/skin.xml +++ b/data/skin.xml @@ -126,11 +126,14 @@ - + + + + diff --git a/lib/python/Screens/InfoBar.py b/lib/python/Screens/InfoBar.py index 2dc7fcee..9892e40b 100644 --- a/lib/python/Screens/InfoBar.py +++ b/lib/python/Screens/InfoBar.py @@ -11,6 +11,7 @@ from Components.config import configfile from Screens.MessageBox import MessageBox from Screens.MovieSelection import MovieSelection from Screens.Volume import Volume +from Screens.Mute import Mute from enigma import * @@ -34,6 +35,7 @@ class InfoBar(Screen): self.state = self.STATE_HIDDEN self.volumeDialog = self.session.instantiateDialog(Volume) + self.muteDialog = self.session.instantiateDialog(Mute) self.hideTimer = eTimer() self.hideTimer.timeout.get().append(self.doTimerHide) @@ -144,11 +146,13 @@ class InfoBar(Screen): def volMute(self): eDVBVolumecontrol.getInstance().volumeToggleMute() - #self.volumeBar.setValue(eDVBVolumecontrol.getInstance().getVolume()) - self.volumeDialog.instance.show() self.volumeDialog.setValue(eDVBVolumecontrol.getInstance().getVolume()) - self.hideVolTimer.start(3000) - + + if (eDVBVolumecontrol.getInstance().isMuted()): + self.muteDialog.instance.show() + else: + self.muteDialog.instance.hide() + def quit(self): configfile.save() quitMainloop() diff --git a/lib/python/Screens/Makefile.am b/lib/python/Screens/Makefile.am index b300d879..f77e1524 100644 --- a/lib/python/Screens/Makefile.am +++ b/lib/python/Screens/Makefile.am @@ -4,4 +4,4 @@ install_PYTHON = \ ChannelSelection.py ClockDisplay.py ConfigMenu.py InfoBar.py Menu.py \ MessageBox.py ScartLoopThrough.py Screen.py ServiceScan.py TimerEdit.py \ MovieSelection.py Setup.py About.py HarddiskSetup.py FixedMenu.py \ - Satconfig.py ScanSetup.py NetworkSetup.py Ci.py TimerEntry.py Volume.py __init__.py + Satconfig.py ScanSetup.py NetworkSetup.py Ci.py TimerEntry.py Volume.py Mute.py __init__.py diff --git a/lib/python/Screens/Mute.py b/lib/python/Screens/Mute.py new file mode 100644 index 00000000..7f4f52da --- /dev/null +++ b/lib/python/Screens/Mute.py @@ -0,0 +1,7 @@ +from Screen import Screen +from Components.VolumeBar import VolumeBar + +class Mute(Screen): + def __init__(self, session): + Screen.__init__(self, session) + diff --git a/lib/python/Screens/__init__.py b/lib/python/Screens/__init__.py index dfb78a63..fd5811c4 100644 --- a/lib/python/Screens/__init__.py +++ b/lib/python/Screens/__init__.py @@ -2,4 +2,4 @@ __all__ = ["ChannelSelection", "ClockDisplay", "ConfigMenu", "InfoBar", "MessageBox", "Menu", "MovieSelection", "ScartLoopThrough", "Screen", "ServiceScan", "About", "TimerEdit", "Setup", "HarddiskSetup", "FixedMenu", - "Satconfig", "Scanconfig", "Ci.py", "Volume.py" ] + "Satconfig", "Scanconfig", "Ci.py", "Volume.py", "Mute.py" ] -- 2.30.2