[pitivi/ges: 279/287] ruler: Remove useless seek methods
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/ges: 279/287] ruler: Remove useless seek methods
- Date: Thu, 15 Mar 2012 16:49:19 +0000 (UTC)
commit b00660a94f6afa049d7d9a6531d6d5b83bca1d4c
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date: Tue Feb 14 16:11:15 2012 -0500
ruler: Remove useless seek methods
pitivi/timeline/ruler.py | 29 ++++-------------------------
1 files changed, 4 insertions(+), 25 deletions(-)
---
diff --git a/pitivi/timeline/ruler.py b/pitivi/timeline/ruler.py
index 49b6849..e2621d1 100644
--- a/pitivi/timeline/ruler.py
+++ b/pitivi/timeline/ruler.py
@@ -139,9 +139,8 @@ class ScaleRuler(gtk.DrawingArea, Zoomable, Loggable):
if self.getShadedDuration() <= 0:
self.debug("no timeline to seek on, ignoring")
self.pressed = True
- # seek at position
- cur = self.pixelToNs(event.x + self.pixmap_offset)
- self._doSeek(cur)
+ position = self.pixelToNs(event.x + self.pixmap_offset)
+ self._seeker.seek(position)
return True
def do_button_release_event(self, event):
@@ -152,9 +151,8 @@ class ScaleRuler(gtk.DrawingArea, Zoomable, Loggable):
def do_motion_notify_event(self, event):
self.debug("motion at event.x %d", event.x)
if self.pressed:
- # seek at position
- cur = self.pixelToNs(event.x + self.pixmap_offset)
- self._doSeek(cur)
+ position = self.pixelToNs(event.x + self.pixmap_offset)
+ self._seeker.seek(position)
return False
def do_scroll_event(self, event):
@@ -168,25 +166,6 @@ class ScaleRuler(gtk.DrawingArea, Zoomable, Loggable):
elif event.direction == gtk.gdk.SCROLL_RIGHT:
pass
-## Seeking methods
-
- def _seekerSeekCb(self, seeker, position, format):
- # clamping values within acceptable range
- duration = self.getShadedDuration()
- if duration in (0, gst.CLOCK_TIME_NONE):
- return
- if position > duration:
- position = duration - (1 * gst.MSECOND)
- elif position < 0:
- position = 0
-
- self.emit('seek', position)
-
- return False
-
- def _doSeek(self, value, format=gst.FORMAT_TIME, on_idle=False):
- self._seeker.seek(value, format, on_idle)
-
## Drawing methods
def doPixmap(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]