add Screens/Volume.py
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Thu, 10 Nov 2005 01:36:49 +0000 (01:36 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Thu, 10 Nov 2005 01:36:49 +0000 (01:36 +0000)
lib/python/Screens/InfoBar.py
lib/python/Screens/Makefile.am
lib/python/Screens/Volume.py [new file with mode: 0644]

index b837c53..9702eed 100644 (file)
@@ -120,15 +120,17 @@ class InfoBar(Screen):
        def     volUp(self):
                eDVBVolumecontrol.getInstance().volumeUp()
                self.volumeDialog.instance.show()
        def     volUp(self):
                eDVBVolumecontrol.getInstance().volumeUp()
                self.volumeDialog.instance.show()
-               #self.volumeDialog.instance.setValue(eDVBVolumecontrol.getInstance().getVolume())
+               # FIXME: help wanted :)
+               self.volumeDialog.instance.setValue(eDVBVolumecontrol.getInstance().getVolume())
                self.hideVolTimer = eTimer()
                self.hideVolTimer.timeout.get().append(self.volHide)
                self.hideVolTimer.start(3000)
 
        def     volDown(self):
                eDVBVolumecontrol.getInstance().volumeDown()
                self.hideVolTimer = eTimer()
                self.hideVolTimer.timeout.get().append(self.volHide)
                self.hideVolTimer.start(3000)
 
        def     volDown(self):
                eDVBVolumecontrol.getInstance().volumeDown()
-               #self.volumeDialog.instance.volumeBar.setValue(eDVBVolumecontrol.getInstance().getVolume())
                self.volumeDialog.instance.show()
                self.volumeDialog.instance.show()
+               # FIXME: help wanted :)
+               self.volumeDialog.setValue(eDVBVolumecontrol.getInstance().getVolume())
                self.hideVolTimer = eTimer()
                self.hideVolTimer.timeout.get().append(self.volHide)
                self.hideVolTimer.start(3000)
                self.hideVolTimer = eTimer()
                self.hideVolTimer.timeout.get().append(self.volHide)
                self.hideVolTimer.start(3000)
index ecd2da5..b300d87 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 \
        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 __init__.py
+       Satconfig.py ScanSetup.py NetworkSetup.py Ci.py TimerEntry.py Volume.py __init__.py
diff --git a/lib/python/Screens/Volume.py b/lib/python/Screens/Volume.py
new file mode 100644 (file)
index 0000000..0c1d4ce
--- /dev/null
@@ -0,0 +1,13 @@
+from Screen import Screen
+from Components.VolumeBar import VolumeBar
+        
+class Volume(Screen):
+    def __init__(self, session):
+        Screen.__init__(self, session)
+        
+        self.volumeBar = VolumeBar()
+        
+        self["Volume"] = self.volumeBar
+        
+    def setValue(self, vol):
+        self.volumeBar.setValue(vol)