pitivi r1307 - in trunk: . pitivi/ui



Author: edwardrv
Date: Thu Oct  9 17:20:07 2008
New Revision: 1307
URL: http://svn.gnome.org/viewvc/pitivi?rev=1307&view=rev

Log:
2008-10-09  Edward Hervey  <edward hervey collabora co uk>

	* pitivi/ui/ruler.py:
	Don't seek if we have an empty timeline.
	Don't set timeouts if the seek failed.

Modified:
   trunk/ChangeLog
   trunk/pitivi/ui/ruler.py

Modified: trunk/pitivi/ui/ruler.py
==============================================================================
--- trunk/pitivi/ui/ruler.py	(original)
+++ trunk/pitivi/ui/ruler.py	Thu Oct  9 17:20:07 2008
@@ -125,6 +125,8 @@
 
     def do_button_press_event(self, event):
         gst.debug("button pressed at x:%d" % event.x)
+        if self.getDuration() <= 0:
+            gst.debug("no timeline to seek on, ignoring")
         instance.PiTiVi.playground.switchToTimeline()
         self.pressed = True
         # seek at position
@@ -158,10 +160,10 @@
         gst.debug("seeking to %s / currentlySeeking %r" % (gst.TIME_ARGS (value),
                                                            self.currentlySeeking))
         if not self.currentlySeeking:
-            self.currentlySeeking = True
-            self.requested_time = value
-            gobject.timeout_add(80, self._seekTimeoutCb)
-            instance.PiTiVi.playground.seekInCurrent(value, format=format)
+            if instance.PiTiVi.playground.seekInCurrent(value, format=format):
+                self.currentlySeeking = True
+                self.requested_time = value
+                gobject.timeout_add(80, self._seekTimeoutCb)
         elif format == gst.FORMAT_TIME:
             self.requested_time = value
 



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