[pitivi] viewer.py: add seek-on-click behavior to viewer slider



commit 4f79ddab3d1275adaa58e233fe026488e15a3931
Author: Brandon Lewis <brandon_lewis alum berkeley edu>
Date:   Thu Dec 10 12:08:03 2009 -0800

    viewer.py: add seek-on-click behavior to viewer slider
    closes bug 432647

 pitivi/ui/viewer.py |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/ui/viewer.py b/pitivi/ui/viewer.py
index dde0a02..03b3e73 100644
--- a/pitivi/ui/viewer.py
+++ b/pitivi/ui/viewer.py
@@ -317,14 +317,18 @@ class PitiviViewer(gtk.VBox, Loggable):
 
     ## gtk.HScale callbacks for self.slider
 
-    def _sliderButtonPressCb(self, slider, unused_event):
+    def _sliderButtonPressCb(self, slider, event):
+        # borrow totem hack for seek-on-click behavior
+        event.button = 2
         self.info("button pressed")
         self.moving_slider = True
         self.valuechangedid = slider.connect("value-changed", self._sliderValueChangedCb)
         self.pipeline.pause()
         return False
 
-    def _sliderButtonReleaseCb(self, slider, unused_event):
+    def _sliderButtonReleaseCb(self, slider, event):
+        # borrow totem hack for seek-on-click behavior
+        event.button = 2
         self.info("slider button release at %s", time_to_string(long(slider.get_value())))
         self.moving_slider = False
         if self.valuechangedid:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]