use mute.png for volume muting
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Thu, 10 Nov 2005 02:08:03 +0000 (02:08 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Thu, 10 Nov 2005 02:08:03 +0000 (02:08 +0000)
data/skin.xml
lib/python/Screens/InfoBar.py
lib/python/Screens/Makefile.am
lib/python/Screens/Mute.py [new file with mode: 0644]
lib/python/Screens/__init__.py

index c1b9aa9..c449723 100644 (file)
                        <widget name="Event_Next_Duration" position="555,98" size="70,26" font="Arial;22" backgroundColor="dark" />
 <!--                   <eLabel position="70,0" size="300,30" text=".oO skin Oo." font="Arial;20" /> -->
                </screen>
-               <screen name="Volume" flags="wfNoBorder" position="140,125" size="180,60" title="Volume">
+               <screen name="Volume" flags="wfNoBorder" position="400,125" size="180,60" title="Volume">
                        <ePixmap position="0,0" size="180,60" pixmap="/usr/share/enigma2/volumeslider-fs8.png" />
                        
                        <widget name="Volume" position="8,38" size="164,11" backgroundColor="dark" />
                </screen>
+               <screen name="Mute" flags="wfNoBorder" position="100,100" size="59,80" title="Mute">
+                       <ePixmap position="0,0" size="59,80" pixmap="/usr/share/enigma2/mute-fs8.png" />
+               </screen>
                <screen name="ChannelSelection" position="90,100" size="560,420" title="Channel Selection">
                        <widget name="list" position="0,50" size="560,320" />
 <!--                   <widget name="okbutton" position="340,50" size="140,30" />-->
index 2dc7fce..9892e40 100644 (file)
@@ -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()
index b300d87..f77e152 100644 (file)
@@ -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 (file)
index 0000000..7f4f52d
--- /dev/null
@@ -0,0 +1,7 @@
+from Screen import Screen
+from Components.VolumeBar import VolumeBar
+        
+class Mute(Screen):
+    def __init__(self, session):
+        Screen.__init__(self, session)
+
index dfb78a6..fd5811c 100644 (file)
@@ -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" ]