[pitivi] Make sure we don't scrollToPlayhead on seek events.
- From: Jean-François Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Make sure we don't scrollToPlayhead on seek events.
- Date: Wed, 24 Apr 2013 18:05:12 +0000 (UTC)
commit 95055e373e27ca82f06572d11da7c7008d3c0bdd
Author: Mathieu Duponchelle <mathieu duponchelle epitech eu>
Date: Mon Apr 22 18:07:11 2013 +0200
Make sure we don't scrollToPlayhead on seek events.
pitivi/timeline/ruler.py | 13 ++++---------
pitivi/timeline/timeline.py | 2 +-
2 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/pitivi/timeline/ruler.py b/pitivi/timeline/ruler.py
index be407c9..b77c65a 100644
--- a/pitivi/timeline/ruler.py
+++ b/pitivi/timeline/ruler.py
@@ -159,11 +159,6 @@ class ScaleRuler(Gtk.DrawingArea, Zoomable, Loggable):
def do_button_release_event(self, event):
self.debug("button released at x:%d", event.x)
self.pressed = False
- # The distinction between the ruler and timeline canvas is theoretical.
- # If the user interacts with the ruler, have the timeline steal focus
- # from other widgets. This reactivates keyboard shortcuts for playback.
- #timeline = self.app.gui.timeline_ui
- #timeline._canvas.grab_focus(timeline._root_item)
return False
def do_motion_notify_event(self, event):
@@ -171,10 +166,10 @@ class ScaleRuler(Gtk.DrawingArea, Zoomable, Loggable):
if self.pressed:
self.debug("motion at event.x %d", event.x)
self._seeker.seek(position)
- else:
- human_time = beautify_length(position)
- cur_frame = int(position / self.ns_per_frame) + 1
- self.set_tooltip_text(human_time + "\n" + _("Frame #%d" % cur_frame))
+
+ human_time = beautify_length(position)
+ cur_frame = int(position / self.ns_per_frame) + 1
+ self.set_tooltip_text(human_time + "\n" + _("Frame #%d" % cur_frame))
return False
def do_scroll_event(self, event):
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index f2c11da..cc0826c 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -877,6 +877,7 @@ class Timeline(Gtk.VBox, Zoomable):
def _scrollToPlayhead(self):
#self.ruler._maybeUpdate()
if self.ruler.pressed or self.pressed:
+ self.pressed = False
return
canvas_size = self.embed.get_allocation().width - CONTROL_WIDTH
try:
@@ -1024,7 +1025,6 @@ class Timeline(Gtk.VBox, Zoomable):
self.pressed = True
position = self.pixelToNs(event.x - CONTROL_WIDTH + self.timeline._scroll_point.x)
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]