[pitivi] - Make the rendering progress dialog not a popup anymore; it was too invasive and didn't allow setti
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] - Make the rendering progress dialog not a popup anymore; it was too invasive and didn't allow setti
- Date: Fri, 10 Dec 2010 17:54:19 +0000 (UTC)
commit bff00e9b38859ed1df7d1c6228536e0a76925a57
Author: Jean-François Fortin Tam <nekohayo gmail com>
Date: Sun Dec 5 12:34:11 2010 -0500
- Make the rendering progress dialog not a popup anymore; it was too invasive and didn't allow setting a title to indicate progress
- Only put the time estimate in the progressbar, not the percentage (which goes in the titlebar)
- Remove the duplicated updatePosition method in encodingdialog (see encodingprogress)
- Show/hide/destroy windows in the right order for proper focus
pitivi/ui/encodingdialog.py | 11 ++---------
pitivi/ui/encodingprogress.glade | 2 +-
pitivi/ui/encodingprogress.py | 7 ++-----
3 files changed, 5 insertions(+), 15 deletions(-)
---
diff --git a/pitivi/ui/encodingdialog.py b/pitivi/ui/encodingdialog.py
index 8756fc5..b2d451a 100644
--- a/pitivi/ui/encodingdialog.py
+++ b/pitivi/ui/encodingdialog.py
@@ -185,12 +185,6 @@ class EncodingDialog(GladeWindow, Renderer, Loggable):
def updateFilename(self, name):
self.fileentry.set_text(name + extension_for_muxer(self.settings.muxer))
- def updatePosition(self, fraction, text):
- self.progressbar.set_fraction(fraction)
- self.window.set_title(_("%.0f%% rendered" % (fraction*100)))
- if text is not None:
- self.progressbar.set_text(_("About %s left") % text)
-
def _muxerComboChangedCb(self, muxer):
basename = os.path.splitext(self.fileentry.get_text())[0]
muxer = get_combo_value(muxer).get_name()
@@ -284,8 +278,8 @@ class EncodingDialog(GladeWindow, Renderer, Loggable):
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.window.hide() # Hide the rendering settings dialog while rendering
+ self.progress.show()
self.startAction()
self.progress.connect("cancel", self._cancelRender)
self.progress.connect("pause", self._pauseRender)
@@ -315,9 +309,8 @@ class EncodingDialog(GladeWindow, Renderer, Loggable):
self.progress.updatePosition(fraction, text)
def updateUIOnEOS(self):
- self.progress.destroy()
self.window.show() # Show the encoding dialog again
- self.window.grab_focus()
+ self.progress.destroy()
self.pipeline.disconnect_by_function(self._stateChanged)
def _cancelButtonClickedCb(self, unused_button):
diff --git a/pitivi/ui/encodingprogress.glade b/pitivi/ui/encodingprogress.glade
index 1a93a3c..aabeb4e 100644
--- a/pitivi/ui/encodingprogress.glade
+++ b/pitivi/ui/encodingprogress.glade
@@ -4,10 +4,10 @@
<!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkDialog" id="render-progress">
<property name="border_width">12</property>
+ <property name="title" translatable="yes">Rendering</property>
<property name="modal">True</property>
<property name="window_position">center-on-parent</property>
<property name="type_hint">dialog</property>
- <property name="skip_taskbar_hint">True</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox2">
<property name="visible">True</property>
diff --git a/pitivi/ui/encodingprogress.py b/pitivi/ui/encodingprogress.py
index 2a41e13..ff3162a 100644
--- a/pitivi/ui/encodingprogress.py
+++ b/pitivi/ui/encodingprogress.py
@@ -51,12 +51,9 @@ class EncodingProgressDialog(GladeWindow, Signallable):
def updatePosition(self, fraction, estimated):
self.progressbar.set_fraction(fraction)
-
- text = _("%d%% Rendered") % int(100 * fraction)
+ self.window.set_title(_("%d%% Rendered") % int(100 * fraction))
if estimated:
- text += _(", about %s left") % estimated
-
- self.progressbar.set_text(text)
+ self.progressbar.set_text(_("About %s left") % estimated)
def setState(self, state):
if state == gst.STATE_PLAYING:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]