[pitivi/ges] Use the pipeline togglePlayback method all around
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/ges] Use the pipeline togglePlayback method all around
- Date: Sat, 5 May 2012 20:18:29 +0000 (UTC)
commit eb074ad8c4176d563343374e26689a770e6f01db
Author: Thibault Saunier <thibault saunier collabora com>
Date: Mon Apr 30 10:21:00 2012 -0400
Use the pipeline togglePlayback method all around
pitivi/render.py | 4 ++--
pitivi/timeline/timeline.py | 2 +-
pitivi/viewer.py | 9 ++-------
3 files changed, 5 insertions(+), 10 deletions(-)
---
diff --git a/pitivi/render.py b/pitivi/render.py
index 9c86e6e..b9fa4db 100644
--- a/pitivi/render.py
+++ b/pitivi/render.py
@@ -36,7 +36,7 @@ import pitivi.utils.loggable as log
from gettext import gettext as _
from pitivi import configure
-from pitivi.utils.playback import togglePlayback, Seeker
+from pitivi.utils.playback import Seeker
from pitivi.utils.signal import Signallable
from pitivi.utils.loggable import Loggable
@@ -878,7 +878,7 @@ class RenderDialog(Loggable):
self._pipeline.set_mode(ges.TIMELINE_MODE_PREVIEW)
def _pauseRender(self, progress):
- togglePlayback(self._pipeline)
+ self.app.current.pipeline.togglePlayback()
def _destroyProgressWindow(self):
""" Handle the completion or the cancellation of the render process. """
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 673f1e6..458a4b4 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -1400,7 +1400,7 @@ class Timeline(gtk.Table, Loggable, Zoomable):
self.app.action_log.commit()
def playPause(self, unused_action):
- self.app.gui.viewer.togglePlayback()
+ self.app.current.pipeline.togglePlayback()
def prevframe(self, action):
prev_kf = self.timeline.getPrevKeyframe(self._position)
diff --git a/pitivi/viewer.py b/pitivi/viewer.py
index 987e61f..b73761b 100644
--- a/pitivi/viewer.py
+++ b/pitivi/viewer.py
@@ -31,7 +31,7 @@ from math import pi
from pitivi.utils.loggable import Loggable
from pitivi.settings import GlobalSettings
-from pitivi.utils.playback import togglePlayback, Seeker
+from pitivi.utils.playback import Seeker
from pitivi.utils.ui import SPACING, hex_to_rgb
from pitivi.utils.widgets import TimeWidget
@@ -387,7 +387,7 @@ class PitiviViewer(gtk.VBox, Loggable):
self.target.renderbox()
def _playButtonCb(self, unused_button, playing):
- self.togglePlayback()
+ self.app.current.pipeline.togglePlayback()
def _goToStartCb(self, unused_button):
self.seeker.seek(0)
@@ -418,11 +418,6 @@ class PitiviViewer(gtk.VBox, Loggable):
## public methods for controlling playback
- def togglePlayback(self):
- if self.pipeline:
- state = togglePlayback(self.pipeline)
- self.playing = (state == gst.STATE_PLAYING)
-
def undock(self):
if not self.undock_action:
self.error("Cannot undock because undock_action is missing.")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]