[pitivi/ges: 216/287] Move the PlayPause action to timeline's playhead actions



commit 22aa8bd482fdc03b2a9cbfd2efcad44ff4a04c37
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date:   Fri Jan 13 10:51:20 2012 -0500

    Move the PlayPause action to timeline's playhead actions
    
    This prevents spacebar from being activated in editable fields.

 pitivi/mainwindow.py        |    6 ------
 pitivi/timeline/timeline.py |    6 ++++++
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/pitivi/mainwindow.py b/pitivi/mainwindow.py
index 62176b6..425b298 100644
--- a/pitivi/mainwindow.py
+++ b/pitivi/mainwindow.py
@@ -245,9 +245,6 @@ class PitiviMainWindow(gtk.Window, Loggable):
             # In some cases we manually specify the translatable label,
             # because we want to have the "..." at the end, indicating
             # an action that requires "further interaction" from the user.
-            ("PlayPause", gtk.STOCK_MEDIA_PLAY, None,
-            "space", _("Start Playback"), self.playPause),
-
             ("Loop", gtk.STOCK_REFRESH, _("Loop"),
             None, _("Loop over selected area"), self.loop),
 
@@ -688,9 +685,6 @@ class PitiviMainWindow(gtk.Window, Loggable):
             self.prefsdialog.dialog.set_transient_for(self)
         self.prefsdialog.run()
 
-    def playPause(self, unused_action):
-        self.viewer.togglePlayback()
-
     def loop(self, unused_action):
         pass
 
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 14ff630..ecfd5b7 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -700,6 +700,9 @@ class Timeline(gtk.Table, Loggable, Zoomable):
         )
 
         self.playhead_actions = (
+            ("PlayPause", gtk.STOCK_MEDIA_PLAY, None,
+            "space", _("Start Playback"), self.playPause),
+
             ("Split", "pitivi-split", _("Split"),
             "S", SPLIT, self.split),
 
@@ -1254,6 +1257,9 @@ class Timeline(gtk.Table, Loggable, Zoomable):
                     interpolator.newKeyframe(position_in_obj)
                     self.app.action_log.commit()
 
+    def playPause(self, unused_action):
+        self.app.gui.viewer.togglePlayback()
+
     def prevframe(self, action):
         timeline_position = self._position
 



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