[pitivi] GtkAligment is deprecated. Margin names have changed.



commit d614a2b29959d257582b973e536cf7008bc78329
Author: Lubosz Sarnecki <lubosz gmail com>
Date:   Tue Sep 16 17:10:22 2014 +0200

    GtkAligment is deprecated. Margin names have changed.
    
    * replace margin-left with margin-start
    
    https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkWidget--margin-left
    
    * replace margin-right with margin-end
    
    https://developer.gnome.org/gtk3/3.13/GtkWidget.html#GtkWidget--margin-right
    
    * replace xalign with halign
    * replace ypad by margin-start

 data/ui/clipmediaprops.ui  |   14 ++++----
 data/ui/effectslibrary.ui  |    4 +-
 data/ui/medialibrary.ui    |    4 +-
 data/ui/projectsettings.ui |   80 ++++++++++++++++++-------------------------
 data/ui/renderingdialog.ui |   30 ++++++++--------
 data/ui/titleeditor.ui     |   12 ++-----
 pitivi/viewer.py           |   10 +++--
 7 files changed, 69 insertions(+), 85 deletions(-)
---
diff --git a/data/ui/clipmediaprops.ui b/data/ui/clipmediaprops.ui
index 2168c93..5fc3033 100644
--- a/data/ui/clipmediaprops.ui
+++ b/data/ui/clipmediaprops.ui
@@ -70,12 +70,12 @@
                   <object class="GtkAlignment" id="alignment1">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="left_padding">12</property>
                     <child>
                       <object class="GtkBox" id="vbox3">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="orientation">vertical</property>
+                        <property name="margin_start">12</property>
                         <child>
                           <object class="GtkBox" id="hbox1">
                             <property name="visible">True</property>
@@ -87,7 +87,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
-                                <property name="xalign">0</property>
+                                <property name="halign">start</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -160,7 +160,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
-                                <property name="xalign">0</property>
+                                <property name="halign">start</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -199,7 +199,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
-                                <property name="xalign">0</property>
+                                <property name="halign">start</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -258,12 +258,12 @@
                   <object class="GtkAlignment" id="alignment2">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="left_padding">12</property>
                     <child>
                       <object class="GtkBox" id="vbox4">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="orientation">vertical</property>
+                        <property name="margin_start">12</property>
                         <child>
                           <object class="GtkBox" id="hbox4">
                             <property name="visible">True</property>
@@ -275,7 +275,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
-                                <property name="xalign">0</property>
+                                <property name="halign">start</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
@@ -314,7 +314,7 @@
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
-                                <property name="xalign">0</property>
+                                <property name="halign">start</property>
                                 <property name="active">True</property>
                                 <property name="draw_indicator">True</property>
                               </object>
diff --git a/data/ui/effectslibrary.ui b/data/ui/effectslibrary.ui
index 1f16e8d..265c134 100644
--- a/data/ui/effectslibrary.ui
+++ b/data/ui/effectslibrary.ui
@@ -73,13 +73,13 @@
       <object class="GtkToolItem" id="toolbutton7">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="margin_left">5</property>
+        <property name="margin_start">5</property>
         <child>
           <object class="GtkEntry" id="search_entry">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="has_tooltip">True</property>
-            <property name="margin_left">3</property>
+            <property name="margin_start">3</property>
             <property name="invisible_char">•</property>
             <property name="invisible_char_set">True</property>
             <property name="secondary_icon_name">edit-clear-symbolic</property>
diff --git a/data/ui/medialibrary.ui b/data/ui/medialibrary.ui
index d39c8d3..cdd457c 100644
--- a/data/ui/medialibrary.ui
+++ b/data/ui/medialibrary.ui
@@ -124,13 +124,13 @@
       <object class="GtkToolItem" id="toolbutton7">
         <property name="visible">True</property>
         <property name="can_focus">False</property>
-        <property name="margin_left">5</property>
+        <property name="margin_start">5</property>
         <child>
           <object class="GtkEntry" id="media_search_entry">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
             <property name="has_tooltip">True</property>
-            <property name="margin_left">3</property>
+            <property name="margin_start">3</property>
             <property name="invisible_char">•</property>
             <property name="invisible_char_set">True</property>
             <property name="primary_icon_name">starred-symbolic</property>
diff --git a/data/ui/projectsettings.ui b/data/ui/projectsettings.ui
index 51f760b..1a8790d 100644
--- a/data/ui/projectsettings.ui
+++ b/data/ui/projectsettings.ui
@@ -129,8 +129,8 @@
                       <object class="GtkLabel" id="label11">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
-                        <property name="ypad">6</property>
+                        <property name="halign">start</property>
+                        <property name="margin_start">6</property>
                         <property name="label" translatable="yes">Video Preset</property>
                         <attributes>
                           <attribute name="weight" value="bold"/>
@@ -297,8 +297,8 @@
                       <object class="GtkLabel" id="label5">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
-                        <property name="ypad">6</property>
+                        <property name="halign">start</property>
+                        <property name="margin_start">6</property>
                         <property name="label" translatable="yes">Size (pixels):</property>
                         <attributes>
                           <attribute name="weight" value="bold"/>
@@ -312,8 +312,8 @@
                       <object class="GtkLabel" id="label2">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
-                        <property name="ypad">6</property>
+                        <property name="halign">start</property>
+                        <property name="margin_start">6</property>
                         <property name="label" translatable="yes">Aspect Ratio:</property>
                         <attributes>
                           <attribute name="weight" value="bold"/>
@@ -332,7 +332,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
-                        <property name="xalign">0</property>
+                        <property name="halign">start</property>
                         <property name="active">True</property>
                         <property name="draw_indicator">True</property>
                         <signal name="toggled" handler="_selectDarRadiobuttonToggledCb" swapped="no"/>
@@ -387,7 +387,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
-                        <property name="xalign">0</property>
+                        <property name="halign">start</property>
                         <property name="draw_indicator">True</property>
                         <property name="group">select_dar_radiobutton</property>
                       </object>
@@ -463,7 +463,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
-                            <property name="xalign">0</property>
+                            <property name="halign">start</property>
                             <property name="draw_indicator">True</property>
                             <signal name="toggled" handler="_constrainSarButtonToggledCb" swapped="no"/>
                           </object>
@@ -483,8 +483,8 @@
                       <object class="GtkLabel" id="label18">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
-                        <property name="ypad">6</property>
+                        <property name="halign">start</property>
+                        <property name="margin_start">6</property>
                         <property name="label" translatable="yes">Frame Rate:</property>
                         <attributes>
                           <attribute name="weight" value="bold"/>
@@ -551,8 +551,8 @@
                       <object class="GtkLabel" id="label10">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
-                        <property name="ypad">6</property>
+                        <property name="halign">start</property>
+                        <property name="margin_start">6</property>
                         <property name="label" translatable="yes">Audio Preset</property>
                         <attributes>
                           <attribute name="weight" value="bold"/>
@@ -708,8 +708,8 @@
                       <object class="GtkLabel" id="label23">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="xalign">0</property>
-                        <property name="ypad">6</property>
+                        <property name="halign">start</property>
+                        <property name="margin_start">6</property>
                         <property name="label" translatable="yes">Format</property>
                         <attributes>
                           <attribute name="weight" value="bold"/>
@@ -721,46 +721,34 @@
                       </packing>
                     </child>
                     <child>
-                      <object class="GtkAlignment" id="alignment2">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="left_padding">12</property>
-                        <child>
                           <object class="GtkLabel" id="label1">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
+                            <property name="halign">start</property>
                             <property name="label" translatable="yes">Channels:</property>
+                            <property name="margin_start">12</property>
                           </object>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="top_attach">1</property>
-                        <property name="bottom_attach">2</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options"/>
-                      </packing>
+                          <packing>
+                            <property name="top_attach">1</property>
+                            <property name="bottom_attach">2</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"/>
+                          </packing>
                     </child>
                     <child>
-                      <object class="GtkAlignment" id="alignment3">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="left_padding">12</property>
-                        <child>
                           <object class="GtkLabel" id="label3">
+                            <property name="margin_start">12</property>
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
+                            <property name="halign">start</property>
                             <property name="label" translatable="yes">Sample rate:</property>
                           </object>
-                        </child>
-                      </object>
-                      <packing>
-                        <property name="top_attach">2</property>
-                        <property name="bottom_attach">3</property>
-                        <property name="x_options">GTK_FILL</property>
-                        <property name="y_options"/>
-                      </packing>
+                          <packing>
+                            <property name="top_attach">2</property>
+                            <property name="bottom_attach">3</property>
+                            <property name="x_options">GTK_FILL</property>
+                            <property name="y_options"/>
+                          </packing>
                     </child>
                     <child>
                       <object class="GtkComboBox" id="channels_combo">
@@ -879,7 +867,7 @@
                   <object class="GtkLabel" id="label25">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label" translatable="yes">Author:</property>
                   </object>
                   <packing>
@@ -893,7 +881,7 @@
                   <object class="GtkLabel" id="label26">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label" translatable="yes">Year:</property>
                   </object>
                   <packing>
@@ -907,7 +895,7 @@
                   <object class="GtkLabel" id="label24">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
+                    <property name="halign">start</property>
                     <property name="label" translatable="yes">Project title:</property>
                   </object>
                   <packing>
diff --git a/data/ui/renderingdialog.ui b/data/ui/renderingdialog.ui
index 126db17..b973059 100644
--- a/data/ui/renderingdialog.ui
+++ b/data/ui/renderingdialog.ui
@@ -139,8 +139,8 @@
                   <object class="GtkLabel" id="label11">
                     <property name="visible">True</property>
                     <property name="can_focus">False</property>
-                    <property name="xalign">0</property>
-                    <property name="ypad">6</property>
+                    <property name="halign">start</property>
+                    <property name="margin_start">6</property>
                     <property name="label" translatable="yes">Render Preset</property>
                     <attributes>
                       <attribute name="weight" value="bold"/>
@@ -326,7 +326,7 @@
                           <object class="GtkLabel" id="label2">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
+                            <property name="halign">start</property>
                             <property name="label" translatable="yes">Container format:</property>
                           </object>
                           <packing>
@@ -339,7 +339,7 @@
                           <object class="GtkLabel" id="label1">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
+                            <property name="halign">start</property>
                             <property name="label" translatable="yes">Folder:</property>
                             <accessibility>
                               <relation type="label-for" target="filebutton"/>
@@ -353,7 +353,7 @@
                           <object class="GtkLabel" id="label5">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
+                            <property name="halign">start</property>
                             <property name="label" translatable="yes">File name:</property>
                             <accessibility>
                               <relation type="label-for" target="fileentry"/>
@@ -451,7 +451,7 @@
                         <property name="visible">True</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
-                        <property name="xalign">0</property>
+                        <property name="halign">start</property>
                         <property name="draw_indicator">True</property>
                       </object>
                       <packing>
@@ -465,7 +465,7 @@
                         <property name="label" translatable="yes">Draft (no special effects, single 
pass)</property>
                         <property name="can_focus">True</property>
                         <property name="receives_default">False</property>
-                        <property name="xalign">0</property>
+                        <property name="halign">start</property>
                         <property name="draw_indicator">True</property>
                       </object>
                       <packing>
@@ -553,7 +553,7 @@
                           <object class="GtkLabel" id="label16">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
+                            <property name="halign">start</property>
                             <property name="label" translatable="yes">Codec:</property>
                           </object>
                           <packing>
@@ -661,7 +661,7 @@
                           <object class="GtkLabel" id="label17">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
+                            <property name="halign">start</property>
                             <property name="label" translatable="yes">Frame rate:</property>
                           </object>
                           <packing>
@@ -674,7 +674,7 @@
                           <object class="GtkLabel" id="label3">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
+                            <property name="halign">start</property>
                             <property name="label" translatable="yes">Scale:</property>
                           </object>
                           <packing>
@@ -689,7 +689,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
-                            <property name="xalign">0</property>
+                            <property name="halign">start</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                             <signal name="toggled" handler="_videoOutputCheckbuttonToggledCb" swapped="no"/>
@@ -762,7 +762,7 @@
                           <object class="GtkLabel" id="label23">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
+                            <property name="halign">start</property>
                             <property name="label" translatable="yes">Channels:</property>
                           </object>
                           <packing>
@@ -775,7 +775,7 @@
                           <object class="GtkLabel" id="label4">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
+                            <property name="halign">start</property>
                             <property name="label" translatable="yes">Sample rate:</property>
                           </object>
                           <packing>
@@ -809,7 +809,7 @@
                             <property name="visible">True</property>
                             <property name="can_focus">True</property>
                             <property name="receives_default">False</property>
-                            <property name="xalign">0</property>
+                            <property name="halign">start</property>
                             <property name="active">True</property>
                             <property name="draw_indicator">True</property>
                             <signal name="toggled" handler="_audioOutputCheckbuttonToggledCb" swapped="no"/>
@@ -823,7 +823,7 @@
                           <object class="GtkLabel" id="label21">
                             <property name="visible">True</property>
                             <property name="can_focus">False</property>
-                            <property name="xalign">0</property>
+                            <property name="halign">start</property>
                             <property name="label" translatable="yes">Codec:</property>
                           </object>
                           <packing>
diff --git a/data/ui/titleeditor.ui b/data/ui/titleeditor.ui
index d91f0f1..79c8715 100644
--- a/data/ui/titleeditor.ui
+++ b/data/ui/titleeditor.ui
@@ -228,8 +228,8 @@
           <object class="GtkTextView" id="textview">
             <property name="visible">True</property>
             <property name="can_focus">True</property>
-            <property name="margin_left">12</property>
-            <property name="margin_right">12</property>
+            <property name="margin_start">12</property>
+            <property name="margin_end">12</property>
             <property name="margin_top">12</property>
             <property name="margin_bottom">12</property>
             <property name="wrap_mode">word</property>
@@ -250,15 +250,11 @@
                 <property name="can_focus">False</property>
                 <property name="orientation">vertical</property>
                 <child>
-                  <object class="GtkAlignment" id="alignment2">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="left_padding">24</property>
-                    <child>
                       <object class="GtkGrid" id="box4">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
                         <property name="column_spacing">6</property>
+                        <property name="margin_start">24</property>
                         <child>
                           <object class="GtkLabel" id="label6">
                             <property name="visible">True</property>
@@ -355,8 +351,6 @@
                           </packing>
                         </child>
                       </object>
-                    </child>
-                  </object>
                   <packing>
                     <property name="expand">True</property>
                     <property name="fill">True</property>
diff --git a/pitivi/viewer.py b/pitivi/viewer.py
index 405ee39..a44a1a6 100644
--- a/pitivi/viewer.py
+++ b/pitivi/viewer.py
@@ -191,9 +191,11 @@ class ViewerContainer(Gtk.VBox, Loggable):
 
         # Buttons/Controls
         bbox = Gtk.HBox()
-        boxalign = Gtk.Alignment(xalign=0.5, yalign=0.5, xscale=0.0, yscale=0.0)
-        boxalign.add(bbox)
-        self.pack_start(boxalign, False, True, SPACING)
+
+        bbox.set_property("valign", Gtk.Align.CENTER)
+        bbox.set_property("halign", Gtk.Align.CENTER)
+
+        self.pack_start(bbox, False, True, SPACING)
 
         self.goToStart_button = Gtk.ToolButton()
         self.goToStart_button.set_icon_name("media-skip-backward")
@@ -266,7 +268,7 @@ class ViewerContainer(Gtk.VBox, Loggable):
             self.internal.set_size_request(width, height)
 
         self.buttons = bbox
-        self.buttons_container = boxalign
+        self.buttons_container = bbox
         self.show_all()
         self.external_vbox.show_all()
 


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