[pitivi] Check in and dist EncodingProgess sub-dialog
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Check in and dist EncodingProgess sub-dialog
- Date: Fri, 10 Dec 2010 17:50:46 +0000 (UTC)
commit 580b8e43237eb20dcc7a39f4d77929ee83f11a83
Author: Brandon Lewis <brandon_lewis alum berkeley edu>
Date: Fri Nov 19 18:30:02 2010 +0000
Check in and dist EncodingProgess sub-dialog
pitivi/ui/Makefile.am | 2 +
pitivi/ui/encodingprogress.glade | 167 ++++++++++++++++++++++++++++++++++++++
pitivi/ui/encodingprogress.py | 71 ++++++++++++++++
3 files changed, 240 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/ui/Makefile.am b/pitivi/ui/Makefile.am
index efa22d1..ac94372 100644
--- a/pitivi/ui/Makefile.am
+++ b/pitivi/ui/Makefile.am
@@ -10,6 +10,7 @@ ui_PYTHON = \
dnd.py \
dynamic.py \
encodingdialog.py \
+ encodingprogress.py \
exportsettingswidget.py \
filelisterrordialog.py \
glade.py \
@@ -48,6 +49,7 @@ ui_DATA = \
elementsettingsdialog.glade \
cam_capture.glade \
encodingdialog.glade \
+ encodingprogress.glade \
exportsettingswidget.glade \
filelisterrordialog.glade \
mainwindow.xml \
diff --git a/pitivi/ui/encodingprogress.glade b/pitivi/ui/encodingprogress.glade
new file mode 100644
index 0000000..2d8be4e
--- /dev/null
+++ b/pitivi/ui/encodingprogress.glade
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<glade-interface>
+ <!-- interface-requires gtk+ 2.6 -->
+ <!-- interface-naming-policy toplevel-contextual -->
+ <widget class="GtkDialog" id="render-progress">
+ <property name="border_width">12</property>
+ <property name="type">popup</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>
+ <property name="spacing">2</property>
+ <child>
+ <widget class="GtkVBox" id="vbox4">
+ <property name="visible">True</property>
+ <property name="spacing">12</property>
+ <child>
+ <widget class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b><big>Rendering movie</big></b></property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkTable" id="table1">
+ <property name="visible">True</property>
+ <property name="n_rows">3</property>
+ <property name="n_columns">2</property>
+ <property name="column_spacing">6</property>
+ <property name="row_spacing">6</property>
+ <child>
+ <widget class="GtkLabel" id="label11">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Unknown Mib</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label10">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Unkown</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label9">
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Encoding first pass</property>
+ </widget>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label8">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Estimated filesize:</b></property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label7">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Frames per second:</b></property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label6">
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes"><b>Phase:</b></property>
+ <property name="use_markup">True</property>
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkProgressBar" id="progressbar">
+ <property name="visible">True</property>
+ </widget>
+ <packing>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area2">
+ <property name="visible">True</property>
+ <property name="layout_style">end</property>
+ <child>
+ <widget class="GtkButton" id="play_pause_button">
+ <property name="label">gtk-media-pause</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="_pauseButtonClickedCb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="button5">
+ <property name="label">gtk-cancel</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="_cancelButtonClickedCb"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+</glade-interface>
diff --git a/pitivi/ui/encodingprogress.py b/pitivi/ui/encodingprogress.py
new file mode 100644
index 0000000..2a41e13
--- /dev/null
+++ b/pitivi/ui/encodingprogress.py
@@ -0,0 +1,71 @@
+# PiTiVi , Non-linear video editor
+#
+# ui/mainwindow.py
+#
+# Copyright (c) 2010, Brandon Lewis <brandon lewis collabora co uk>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+"""
+Encoding dialog
+"""
+
+import gtk
+import gst
+from pitivi.ui.glade import GladeWindow
+import pitivi.configure as configure
+from gettext import gettext as _
+import gobject
+from pitivi.signalinterface import Signallable
+
+class EncodingProgressDialog(GladeWindow, Signallable):
+
+ glade_file = "encodingprogress.glade"
+
+ __signals__ = {
+ "pause": [],
+ "cancel": [],
+ }
+
+ def __init__(self, app, parent):
+ GladeWindow.__init__(self)
+
+ self.app = app
+ self.window.set_transient_for(parent.window)
+
+ # UI widgets
+ self.window.set_icon_from_file(configure.get_pixmap_dir() + "/pitivi-render-16.png")
+
+ def updatePosition(self, fraction, estimated):
+ self.progressbar.set_fraction(fraction)
+
+ text = _("%d%% Rendered") % int(100 * fraction)
+ if estimated:
+ text += _(", about %s left") % estimated
+
+ self.progressbar.set_text(text)
+
+ def setState(self, state):
+ if state == gst.STATE_PLAYING:
+ self.play_pause_button.props.label = gtk.STOCK_MEDIA_PAUSE
+ else:
+ self.play_pause_button.props.label = 'pitivi-render'
+
+ def _cancelButtonClickedCb(self, unused_button):
+ self.emit("cancel")
+
+ def _pauseButtonClickedCb(self, unused_button):
+ self.emit("pause")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]