[pitivi] Add a contextual help button in the render dialog to explain container formats



commit cbd8910de2ebea122c2ff5ccad218a656c7ab209
Author: Jean-François Fortin Tam <nekohayo gmail com>
Date:   Tue Mar 19 14:31:11 2013 -0400

    Add a contextual help button in the render dialog to explain container formats

 data/ui/renderingdialog.ui |   83 ++++++++++++++++++++++++++++---------------
 pitivi/render.py           |    4 ++
 2 files changed, 58 insertions(+), 29 deletions(-)
---
diff --git a/data/ui/renderingdialog.ui b/data/ui/renderingdialog.ui
index 2497f6b..7adaf79 100644
--- a/data/ui/renderingdialog.ui
+++ b/data/ui/renderingdialog.ui
@@ -320,40 +320,11 @@
                           </packing>
                         </child>
                         <child>
-                          <object class="GtkComboBox" id="muxercombobox">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <property name="model">model1</property>
-                            <property name="active">0</property>
-                            <child internal-child="accessible">
-                              <object class="AtkObject" id="muxercombobox-atkobject">
-                                <property name="AtkObject::accessible-name" translatable="yes">Container 
format</property>
-                              </object>
-                            </child>
-                            <signal name="changed" handler="_muxerComboChangedCb" swapped="no"/>
-                            <child>
-                              <object class="GtkCellRendererText" id="renderer1"/>
-                              <attributes>
-                                <attribute name="text">0</attribute>
-                              </attributes>
-                            </child>
-                          </object>
-                          <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>
                           <object class="GtkLabel" id="label2">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
                             <property name="xalign">0</property>
                             <property name="label" translatable="yes">Container format:</property>
-                            <accessibility>
-                              <relation type="label-for" target="muxercombobox"/>
-                            </accessibility>
                           </object>
                           <packing>
                             <property name="top_attach">2</property>
@@ -410,6 +381,60 @@
                             <property name="bottom_attach">2</property>
                           </packing>
                         </child>
+                        <child>
+                          <object class="GtkBox" id="box1">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="spacing">6</property>
+                            <child>
+                              <object class="GtkComboBox" id="muxercombobox">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="model">model1</property>
+                                <property name="active">0</property>
+                                <child internal-child="accessible">
+                                  <object class="AtkObject" id="muxercombobox-atkobject">
+                                    <property name="AtkObject::accessible-name" translatable="yes">Container 
format</property>
+                                  </object>
+                                </child>
+                                <signal name="changed" handler="_muxerComboChangedCb" swapped="no"/>
+                                <child>
+                                  <object class="GtkCellRendererText" id="renderer1"/>
+                                  <attributes>
+                                    <attribute name="text">0</attribute>
+                                  </attributes>
+                                </child>
+                              </object>
+                              <packing>
+                                <property name="expand">True</property>
+                                <property name="fill">True</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <object class="GtkButton" id="container_context_help_button">
+                                <property name="label">gtk-help</property>
+                                <property name="visible">True</property>
+                                <property name="can_focus">True</property>
+                                <property name="receives_default">True</property>
+                                <property name="use_stock">True</property>
+                                <property name="always_show_image">True</property>
+                                <signal name="clicked" handler="_containerContextHelpClickedCb" 
swapped="no"/>
+                              </object>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">True</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
+                          </object>
+                          <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>
                       </object>
                       <packing>
                         <property name="expand">False</property>
diff --git a/pitivi/render.py b/pitivi/render.py
index 6a5d9ae..6d98b98 100644
--- a/pitivi/render.py
+++ b/pitivi/render.py
@@ -37,6 +37,7 @@ from pitivi.utils.signal import Signallable
 from pitivi.utils.loggable import Loggable
 from pitivi.utils.widgets import GstElementSettingsDialog
 from pitivi.utils.ripple_update_group import RippleUpdateGroup
+from pitivi.utils.misc import show_user_manual
 from pitivi.utils.ui import model, frame_rates, audio_rates, audio_depths, \
     audio_channels, get_combo_value, set_combo_value, beautify_ETA
 try:
@@ -843,6 +844,9 @@ class RenderDialog(Loggable):
         self.debug("Render dialog is being deleted")
         self.destroy()
 
+    def _containerContextHelpClickedCb(self, unused_button):
+        show_user_manual("codecscontainers")
+
     #-- GStreamer callbacks
     def _busMessageCb(self, unused_bus, message):
         if message.type == Gst.MessageType.EOS:  # Render complete


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