[pitivi] Clicking anywhere on the timeline will now seek.



commit 64b2f6bbfb0c19e368561cfbdf3dd2fd758b1ef5
Author: Mathieu Duponchelle <mathieu duponchelle epitech eu>
Date:   Sun Apr 21 22:15:42 2013 +0200

    Clicking anywhere on the timeline will now seek.

 pitivi/timeline/timeline.py |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 1d324e3..5032a3f 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -863,7 +863,7 @@ class Timeline(Gtk.VBox, Zoomable):
 
     def _scrollToPlayhead(self):
         #self.ruler._maybeUpdate()
-        if self.ruler.pressed:
+        if self.ruler.pressed or self.pressed:
             return
         canvas_size = self.embed.get_allocation().width - CONTROL_WIDTH
         new_pos = self.timeline.playhead.props.x
@@ -1005,6 +1005,10 @@ class Timeline(Gtk.VBox, Zoomable):
             self.controlMask = False
 
     def _clickedCb(self, stage, event):
+        self.pressed = True
+        position = self.pixelToNs(event.x - CONTROL_WIDTH)
+        self._seeker.seek(position)
+        self.pressed = False
         actor = self.stage.get_actor_at_pos(Clutter.PickMode.REACTIVE, event.x, event.y)
         if actor == stage:
             self.timeline.emptySelection()


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