[pitivi] pitivi/ui/mainwindow.py: connect to the project seeker in mainwindow.py



commit de58d619e620f2af0e9593a83c83e7708bc74d48
Author: Brandon Lewis <brandon_lewis alum berkeley edu>
Date:   Tue Dec 1 16:01:51 2009 -0800

    pitivi/ui/mainwindow.py: connect to the project seeker in mainwindow.py
    note that this commit will break all seeking. it is restored by later commits.

 pitivi/ui/mainwindow.py |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/ui/mainwindow.py b/pitivi/ui/mainwindow.py
index 6d18eb0..c3d152e 100644
--- a/pitivi/ui/mainwindow.py
+++ b/pitivi/ui/mainwindow.py
@@ -386,8 +386,6 @@ class PitiviMainWindow(gtk.Window, Loggable):
 
         hpaned.pack1(self.projecttabs, resize=True, shrink=False)
 
-        self.timeline.ruler.connect('seek', self._timelineRulerSeekCb)
-
         # Viewer
         self.viewer = PitiviViewer()
         # drag and drop
@@ -693,6 +691,8 @@ class PitiviMainWindow(gtk.Window, Loggable):
         else:
             self._zoom_duration_changed = True
 
+        self.project.seeker.connect("seek", self._timelineSeekCb)
+
     def _setBestZoomRatio(self):
         ruler_width = self.timeline.ruler.get_allocation()[2]
         timeline_duration = self.project.timeline.duration
@@ -790,6 +790,7 @@ class PitiviMainWindow(gtk.Window, Loggable):
         self._disconnectFromProjectSources(project.sources)
         self.viewer.setAction(None)
         self.viewer.setPipeline(None)
+        project.seeker.disconnect_by_func(self._timelineSeekCb)
         return False
 
     def _projectManagerNewProjectFailedCb(self, projectManager, uri, exception):
@@ -1038,7 +1039,7 @@ class PitiviMainWindow(gtk.Window, Loggable):
         self.viewer.setPipeline(pipeline)
         self.viewer.play()
 
-    def _timelineRulerSeekCb(self, ruler, position):
+    def _timelineSeekCb(self, ruler, position, format):
         self.debug("position:%s", gst.TIME_ARGS (position))
         if self.viewer.action != self.project.view_action:
             self.viewer.setPipeline(None)
@@ -1052,7 +1053,7 @@ class PitiviMainWindow(gtk.Window, Loggable):
         # set to the pipeline.
         self.project.pipeline.pause()
         try:
-            self.project.pipeline.seek(position)
+            self.project.pipeline.seek(position, format)
         except:
             self.debug("Seeking failed")
 



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