[pitivi/ges: 140/287] Properly connect to the pipeline state when rendering to inhibit sleep
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/ges: 140/287] Properly connect to the pipeline state when rendering to inhibit sleep
- Date: Thu, 15 Mar 2012 16:37:36 +0000 (UTC)
commit 29ce303aea1bd5d7ba3f860ce26d97fe7f94979c
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date: Mon Jan 2 11:33:33 2012 -0500
Properly connect to the pipeline state when rendering to inhibit sleep
help/C/rendering.page | 4 ++--
pitivi/ui/encodingdialog.py | 9 ++-------
2 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/help/C/rendering.page b/help/C/rendering.page
index 0008e3c..52a7e34 100644
--- a/help/C/rendering.page
+++ b/help/C/rendering.page
@@ -5,7 +5,7 @@
<info>
<link type="guide" xref="index#rendering"/>
- <revision pkgversion="0.13.4" version="0.1" date="2010-12-05" status="incomplete"/>
+ <revision pkgversion="0.16" version="0.1" date="2012-01-02" status="incomplete"/>
<credit type="author">
<name>Jean-FranÃois Fortin Tam</name>
<email>nekohayo gmail com</email>
@@ -31,7 +31,7 @@
<item><p>Click the <gui>Render</gui> button.</p></item>
</steps>
<note style="bug">
- <p>If your computer is set to suspend or hibernate automatically, <app>PiTiVi</app> will automatically inhibit the power saving features during the render process (see bug <link href="https://bugzilla.gnome.org/show_bug.cgi?id=571885">bug #571885</link>).</p>
+ <p>If your computer is set to suspend or hibernate automatically, <app>PiTiVi</app> will automatically inhibit the power saving features during the render process.</p>
</note>
</page>
diff --git a/pitivi/ui/encodingdialog.py b/pitivi/ui/encodingdialog.py
index 285def4..61a817f 100644
--- a/pitivi/ui/encodingdialog.py
+++ b/pitivi/ui/encodingdialog.py
@@ -142,8 +142,10 @@ class EncodingProgressDialog(Signallable):
def setState(self, state):
if state == gst.STATE_PLAYING:
self.play_pause_button.props.label = gtk.STOCK_MEDIA_PAUSE
+ self.system.inhibitSleep(EncodingDialog.INHIBIT_REASON)
else:
self.play_pause_button.props.label = 'pitivi-render'
+ self.system.uninhibitSleep(EncodingDialog.INHIBIT_REASON)
def _cancelButtonClickedCb(self, unused_button):
self.emit("cancel")
@@ -224,7 +226,6 @@ class EncodingDialog(Loggable):
self._displayRenderSettings()
self.window.connect("delete-event", self._deleteEventCb)
- self.pipeline.connect("state-changed", self._pipelineStateChangedCb)
self.settings.connect("settings-changed", self._settingsChanged)
# Monitor changes
@@ -567,12 +568,6 @@ class EncodingDialog(Loggable):
self.sample_depth_combo.set_model(audio_depths)
self.muxercombobox.set_model(factorylist(ExportSettings.muxers))
- def _pipelineStateChangedCb(self, pipeline, state):
- if state == gst.STATE_PLAYING:
- self.system.inhibitSleep(EncodingDialog.INHIBIT_REASON)
- else:
- self.system.uninhibitSleep(EncodingDialog.INHIBIT_REASON)
-
def _displaySettings(self):
"""Display the settings that also change in the ProjectSettingsDialog.
"""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]