[jokosher-devel] [PATCH] - Set volume to 100%
- From: Thom Shutt <ts106 doc ic ac uk>
- To: jokosher-devel-list gnome org
- Subject: [jokosher-devel] [PATCH] - Set volume to 100%
- Date: Wed, 16 May 2007 17:22:53 +0100
Ok, just got Jokosher earlier today and this teeny patch is my first so
don't be too harsh! Any feedback would be gratefully received though,
espescially if I've misunderstood something in the code.
Something else that I noticed while using the program is that the volume
slider displays its tip in the status bar, while the pan control
displays a tooltip, which seems slightly inconsistent. Is this intentional?
Index: VUWidget.py
===================================================================
--- VUWidget.py (revision 1381)
+++ VUWidget.py (working copy)
@@ -114,6 +114,12 @@
widget -- reserved for GTK callbacks, don't use it explicitly.
mouse -- reserved for GTK callbacks, don't use it explicitly.
"""
+ #If the slider is right-clicked then set the volume to 100%
+ if mouse.button == 3:
+ volume = 1.
+ self.mixerstrip.SetVolume(0.5 * self._MAX_VOLUME)
+ return True
+
if self.__YPosOverVolumeHandle(mouse.y):
response = gtk.gdk.pointer_grab(self.window, False, self._POINTER_GRAB_EVENTS, None, None, mouse.time)
self.fader_active = (response == gtk.gdk.GRAB_SUCCESS)
@@ -136,8 +142,9 @@
widget -- reserved for GTK callbacks, don't use it explicitly.
mouse -- reserved for GTK callbacks, don't use it explicitly.
"""
+
if not self.message_id:
- self.message_id = self.mainview.SetStatusBar(_("<b>Drag</b> the <b>slider</b> to alter volume levels"))
+ self.message_id = self.mainview.SetStatusBar(_("<b>Drag</b> the <b>slider</b> to alter volume levels. <b>Right-Click</b> to set the <b>slider</b> to 100%"))
oldHover = self.fader_hover
self.fader_hover = (0 < mouse.x < self.get_allocation().width) and self.__YPosOverVolumeHandle(mouse.y)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]