[pitivi/ges] Allow pausing and resuming rendering



commit 6c704238eb0964415ad54cbc8ba785145e01c686
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date:   Fri Apr 27 23:15:08 2012 -0400

    Allow pausing and resuming rendering
    
    Also make the pause button a ToggleButton and make the
    render progress dialog truly modal.
    
    Fixes bug #650710

 data/ui/renderingprogress.ui |    8 ++++----
 pitivi/render.py             |    5 +----
 2 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/data/ui/renderingprogress.ui b/data/ui/renderingprogress.ui
index c9d8cf0..54b80b1 100644
--- a/data/ui/renderingprogress.ui
+++ b/data/ui/renderingprogress.ui
@@ -2,13 +2,13 @@
 <interface>
   <!-- interface-requires gtk+ 2.6 -->
   <object class="GtkDialog" id="render-progress">
-    <property name="width_request">300</property>
     <property name="can_focus">False</property>
     <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">normal</property>
+    <property name="default_width">400</property>
+    <property name="type_hint">dialog</property>
     <child internal-child="vbox">
       <object class="GtkBox" id="dialog-vbox2">
         <property name="visible">True</property>
@@ -21,14 +21,14 @@
             <property name="can_focus">False</property>
             <property name="layout_style">end</property>
             <child>
-              <object class="GtkButton" id="play_pause_button">
+              <object class="GtkToggleButton" 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_action_appearance">False</property>
                 <property name="use_stock">True</property>
-                <signal name="clicked" handler="_pauseButtonClickedCb" swapped="no"/>
+                <signal name="toggled" handler="_pauseButtonClickedCb" swapped="no"/>
               </object>
               <packing>
                 <property name="expand">False</property>
diff --git a/pitivi/render.py b/pitivi/render.py
index ce66747..e3f5abc 100644
--- a/pitivi/render.py
+++ b/pitivi/render.py
@@ -346,8 +346,7 @@ class RenderingProgressDialog(Signallable):
         # UI widgets
         self.window.set_icon_from_file(configure.get_pixmap_dir() + "/pitivi-render-16.png")
 
-        # FIXME: re-enable these widgets when bugs #650710 and 637079 are fixed
-        self.play_pause_button.hide()
+        # TODO: show this widget for rendering statistics (bug 637079)
         self.table1.hide()
 
     def updatePosition(self, fraction, estimated):
@@ -358,10 +357,8 @@ class RenderingProgressDialog(Signallable):
 
     def setState(self, state):
         if state == gst.STATE_PLAYING:
-            self.play_pause_button.props.label = gtk.STOCK_MEDIA_PAUSE
             self.system.inhibitSleep(RenderDialog.INHIBIT_REASON)
         else:
-            self.play_pause_button.props.label = 'pitivi-render'
             self.system.uninhibitSleep(RenderDialog.INHIBIT_REASON)
 
     def _cancelButtonClickedCb(self, unused_button):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]