[pitivi] project: Override GES.Timeline.commit to save commit actions



commit c3d16fb1ac93ae188debb2af33878a0c14653faf
Author: Thibault Saunier <tsaunier gnome org>
Date:   Thu Sep 25 12:09:55 2014 +0200

    project: Override GES.Timeline.commit to save commit actions
    
    Now scenario have to contain all information about timeline
    committing, make sure that the commit action is serialized.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=739251

 pitivi/project.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/project.py b/pitivi/project.py
index 1d09256..526eacd 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -934,6 +934,13 @@ class Project(Loggable, GES.Project):
     # ------------------------------------------ #
     #               Our API                      #
     # ------------------------------------------ #
+    def _commit(self):
+        """
+        Our override of the GES.Timeline.commit method, letting us
+        scenarialize the action in the scenarios.
+        """
+        self.app.write_action(Gst.Structure.new_empty("commit"))
+        GES.Timeline.commit(self.timeline)
 
     def createTimeline(self):
         """
@@ -941,6 +948,7 @@ class Project(Loggable, GES.Project):
         """
         # In this extract call the project is loaded from the file.
         self.timeline = self.extract()
+        self.timeline.commit = self._commit
         if self.timeline is None:
             return False
         if not self.timeline.get_layers():


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