[pitivi] Use Gtk.Box instead of Gtk.HBox because Gtk.HBox is obsolete



commit faac7bfa6f0831c71f8af771cd9a5c14d9a68086
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Fri Nov 21 03:55:21 2014 +0100

    Use Gtk.Box instead of Gtk.HBox because Gtk.HBox is obsolete

 pitivi/mainwindow.py          |    6 ++++--
 pitivi/mediafilespreviewer.py |    3 ++-
 pitivi/project.py             |    3 ++-
 pitivi/timeline/layer.py      |    6 ++++--
 pitivi/transitions.py         |    3 ++-
 pitivi/utils/widgets.py       |   15 +++++++++------
 pitivi/viewer.py              |    5 ++---
 7 files changed, 25 insertions(+), 16 deletions(-)
---
diff --git a/pitivi/mainwindow.py b/pitivi/mainwindow.py
index c92c4a2..8e166a5 100644
--- a/pitivi/mainwindow.py
+++ b/pitivi/mainwindow.py
@@ -846,7 +846,8 @@ class PitiviMainWindow(Gtk.ApplicationWindow, Loggable):
         # make the [[image] text] hbox
         image = Gtk.Image.new_from_icon_name(
             "dialog-question", Gtk.IconSize.DIALOG)
-        hbox = Gtk.HBox(homogeneous=False, spacing=SPACING * 2)
+        hbox = Gtk.Box(homogeneous=False, spacing=SPACING * 2)
+        hbox.set_orientation(Gtk.Orientation.HORIZONTAL)
         hbox.pack_start(image, False, True, 0)
         hbox.pack_start(vbox, True, True, 0)
         hbox.set_border_width(SPACING)
@@ -944,7 +945,8 @@ class PitiviMainWindow(Gtk.ApplicationWindow, Loggable):
         dialog.set_default_response(Gtk.ResponseType.OK)
 
         # This box will contain the label and optionally a thumbnail
-        hbox = Gtk.HBox()
+        hbox = Gtk.Box()
+        hbox.set_orientation(Gtk.Orientation.HORIZONTAL)
         hbox.set_spacing(SPACING)
 
         # Check if we have a thumbnail available.
diff --git a/pitivi/mediafilespreviewer.py b/pitivi/mediafilespreviewer.py
index a8895d9..e540e7b 100644
--- a/pitivi/mediafilespreviewer.py
+++ b/pitivi/mediafilespreviewer.py
@@ -123,7 +123,8 @@ class PreviewWidget(Gtk.Grid, Loggable):
         self.attach(self.preview_image, 0, 1, 1, 1)
 
         # Play button
-        self.bbox = Gtk.HBox()
+        self.bbox = Gtk.Box()
+        self.bbox.set_orientation(Gtk.Orientation.HORIZONTAL)
         self.play_button = Gtk.ToolButton()
         self.play_button.set_icon_name("media-playback-start")
         self.play_button.connect("clicked", self._on_start_stop_clicked_cb)
diff --git a/pitivi/project.py b/pitivi/project.py
index d3c78da..41809cf 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -375,7 +375,8 @@ class ProjectManager(GObject.Object, Loggable):
         # make the [[image] text] hbox
         image = Gtk.Image.new_from_icon_name(
             "dialog-question", Gtk.IconSize.DIALOG)
-        hbox = Gtk.HBox(homogeneous=False, spacing=SPACING * 2)
+        hbox = Gtk.Box(homogeneous=False, spacing=SPACING * 2)
+        hbox.set_orientation(Gtk.Orientation.HORIZONTAL)
         hbox.pack_start(image, False, True, 0)
         hbox.pack_start(vbox, True, True, 0)
         hbox.set_border_width(SPACING)
diff --git a/pitivi/timeline/layer.py b/pitivi/timeline/layer.py
index 5a11f24..d9ba35f 100644
--- a/pitivi/timeline/layer.py
+++ b/pitivi/timeline/layer.py
@@ -116,13 +116,15 @@ class BaseLayerControl(Gtk.Box, Loggable):
                                             "Disabled layers will not play nor render."))
 
         # Upper bar
-        upper = Gtk.HBox()
+        upper = Gtk.Box()
+        upper.set_orientation(Gtk.Orientation.HORIZONTAL)
         upper.pack_start(self.name_entry, True, True, 0)
         upper.pack_start(self.solo_button, False, False, 0)
         upper.pack_start(visible_option, False, False, 0)
 
         # Lower bar
-        self.lower_hbox = Gtk.HBox()
+        self.lower_hbox = Gtk.Box()
+        self.lower_hbox.set_orientation(Gtk.Orientation.HORIZONTAL)
         self.lower_hbox.set_sensitive(False)
 
         table.attach(upper, 1, 2, 0, 1)
diff --git a/pitivi/transitions.py b/pitivi/transitions.py
index 48587a6..c07ba01 100644
--- a/pitivi/transitions.py
+++ b/pitivi/transitions.py
@@ -64,7 +64,8 @@ class TransitionsListWidget(Gtk.Box, Loggable):
         self._current_tooltip_icon = None
 
         # Searchbox
-        self.searchbar = Gtk.HBox()
+        self.searchbar = Gtk.Box()
+        self.searchbar.set_orientation(Gtk.Orientation.HORIZONTAL)
         # Prevents being flush against the notebook
         self.searchbar.set_border_width(3)
         self.searchEntry = Gtk.Entry()
diff --git a/pitivi/utils/widgets.py b/pitivi/utils/widgets.py
index 9632469..529f62b 100644
--- a/pitivi/utils/widgets.py
+++ b/pitivi/utils/widgets.py
@@ -87,7 +87,7 @@ class DefaultWidget(Gtk.Label):
         pass
 
 
-class TextWidget(Gtk.HBox, DynamicWidget):
+class TextWidget(Gtk.Box, DynamicWidget):
 
     """
     A Gtk.Entry which emits a "value-changed" signal only when its input is
@@ -113,9 +113,10 @@ class TextWidget(Gtk.HBox, DynamicWidget):
             # In the case of text widgets, a blank default is an empty string
             default = ""
 
-        Gtk.HBox.__init__(self)
+        Gtk.Box.__init__(self)
         DynamicWidget.__init__(self, default)
 
+        self.set_orientation(Gtk.Orientation.HORIZONTAL)
         self.set_border_width(0)
         self.set_spacing(0)
         if choices:
@@ -199,16 +200,17 @@ class TextWidget(Gtk.HBox, DynamicWidget):
         self.text.set_width_chars(width)
 
 
-class NumericWidget(Gtk.HBox, DynamicWidget):
+class NumericWidget(Gtk.Box, DynamicWidget):
 
     """An horizontal Gtk.Scale and a Gtk.SpinButton which share an adjustment.
     The SpinButton is always displayed, while the Scale only appears if both
     lower and upper bounds are defined"""
 
     def __init__(self, upper=None, lower=None, default=None):
-        Gtk.HBox.__init__(self)
+        Gtk.Box.__init__(self)
         DynamicWidget.__init__(self, default)
 
+        self.set_orientation(Gtk.Orientation.HORIZONTAL)
         self.spacing = SPACING
         self.adjustment = Gtk.Adjustment()
         self.upper = upper
@@ -436,17 +438,18 @@ class ToggleWidget(Gtk.CheckButton, DynamicWidget):
         return self.get_active()
 
 
-class ChoiceWidget(Gtk.HBox, DynamicWidget):
+class ChoiceWidget(Gtk.Box, DynamicWidget):
 
     """Abstractly, represents a choice between a list of named values. The
     association between value names and values is arbitrary. The current
     implementation uses a Gtk.ComboBoxText for simplicity."""
 
     def __init__(self, choices, default=None):
-        Gtk.HBox.__init__(self)
+        Gtk.Box.__init__(self)
         DynamicWidget.__init__(self, default)
         self.choices = None
         self.values = None
+        self.set_orientation(Gtk.Orientation.HORIZONTAL)
         self.contents = Gtk.ComboBoxText()
         self.pack_start(self.contents, expand=True, fill=True, padding=0)
         self.setChoices(choices)
diff --git a/pitivi/viewer.py b/pitivi/viewer.py
index b30917e..23ce579 100644
--- a/pitivi/viewer.py
+++ b/pitivi/viewer.py
@@ -210,11 +210,10 @@ class ViewerContainer(Gtk.Box, Loggable):
         self.external_vbox = vbox
 
         # Buttons/Controls
-        bbox = Gtk.HBox()
-
+        bbox = Gtk.Box()
+        bbox.set_orientation(Gtk.Orientation.HORIZONTAL)
         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()


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