[pitivi] RenderDialog: implement render button
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] RenderDialog: implement render button
- Date: Fri, 10 Dec 2010 17:51:42 +0000 (UTC)
commit 1462464f424a801f0a93e7bf0cc847d8c10f37aa
Author: Brandon Lewis <brandon_lewis alum berkeley edu>
Date: Fri Nov 19 19:13:33 2010 +0000
RenderDialog: implement render button
pitivi/ui/encodingdialog.py | 22 ++++++++++++++++++++++
1 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/ui/encodingdialog.py b/pitivi/ui/encodingdialog.py
index c0b1f60..cb9eaa4 100644
--- a/pitivi/ui/encodingdialog.py
+++ b/pitivi/ui/encodingdialog.py
@@ -233,7 +233,24 @@ class EncodingDialog(GladeWindow, Renderer):
setattr(self.settings, settings_attr, dialog.getSettings())
dialog.destroy()
+ def _renderButtonClickedCb(self, unused_button):
+ self.outfile = self.filebutton.get_uri() + "/" + self.fileentry.get_text()
+ self.progress = EncodingProgressDialog(self.app, self)
+ self.progress.show()
self.startAction()
+ self.progress.connect("cancel", self._cancelRender)
+ self.progress.connect("pause", self._pauseRender)
+ self.pipeline.connect("state-changed", self._stateChanged)
+
+ def _cancelRender(self, progress):
+ self.debug("aborting render")
+ self.shutdown()
+
+ def _pauseRender(self, progress):
+ self.pipeline.togglePlayback()
+
+ def _stateChanged(self, pipeline, state):
+ self.progress.setState(state)
def _settingsButtonClickedCb(self, unused_button):
dialog = ExportSettingsDialog(self.app, self.settings)
@@ -244,7 +261,12 @@ class EncodingDialog(GladeWindow, Renderer):
self._displaySettings()
dialog.destroy()
+ def updatePosition(self, fraction, text):
+ self.progress.updatePosition(fraction, text)
+
def updateUIOnEOS(self):
+ self.progress.destroy()
+ self.pipeline.disconnect_by_function(self._stateChanged)
def _cancelButtonClickedCb(self, unused_button):
self.debug("Cancelling !")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]