[pitivi] Use Gtk.Box instead of Gtk.VBox because Gtk.VBox is obsolete
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Use Gtk.Box instead of Gtk.VBox because Gtk.VBox is obsolete
- Date: Tue, 27 Jan 2015 18:39:14 +0000 (UTC)
commit 9c1550aa9aa10c03352ba48bb759662bfc4e515a
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Fri Nov 21 03:43:05 2014 +0100
Use Gtk.Box instead of Gtk.VBox because Gtk.VBox is obsolete
pitivi/clipproperties.py | 6 ++++--
pitivi/effects.py | 5 +++--
pitivi/mainwindow.py | 3 ++-
pitivi/mediafilespreviewer.py | 3 ++-
pitivi/medialibrary.py | 5 +++--
pitivi/project.py | 3 ++-
pitivi/timeline/elements.py | 3 ++-
pitivi/timeline/layer.py | 14 ++++++--------
pitivi/transitions.py | 8 +++++---
pitivi/utils/widgets.py | 5 +++--
pitivi/viewer.py | 9 ++++++---
11 files changed, 38 insertions(+), 26 deletions(-)
---
diff --git a/pitivi/clipproperties.py b/pitivi/clipproperties.py
index 5815485..bf807f4 100644
--- a/pitivi/clipproperties.py
+++ b/pitivi/clipproperties.py
@@ -73,12 +73,14 @@ class ClipProperties(Gtk.ScrolledWindow, Loggable):
viewport.show()
self.add(viewport)
- vbox = Gtk.VBox()
+ vbox = Gtk.Box()
+ vbox.set_orientation(Gtk.Orientation.VERTICAL)
vbox.set_spacing(SPACING)
vbox.show()
viewport.add(vbox)
- self.infobar_box = Gtk.VBox()
+ self.infobar_box = Gtk.Box()
+ self.infobar_box.set_orientation(Gtk.Orientation.VERTICAL)
self.infobar_box.show()
vbox.pack_start(self.infobar_box, False, True, 0)
diff --git a/pitivi/effects.py b/pitivi/effects.py
index d1f9e14..86677cb 100644
--- a/pitivi/effects.py
+++ b/pitivi/effects.py
@@ -317,12 +317,12 @@ GlobalSettings.addConfigSection('effect-library')
COL_ICON) = list(range(7))
-class EffectListWidget(Gtk.VBox, Loggable):
+class EffectListWidget(Gtk.Box, Loggable):
""" Widget for listing effects """
def __init__(self, instance, unused_uiman):
- Gtk.VBox.__init__(self)
+ Gtk.Box.__init__(self)
Loggable.__init__(self)
self.app = instance
@@ -330,6 +330,7 @@ class EffectListWidget(Gtk.VBox, Loggable):
self._draggedItems = None
self._effectType = VIDEO_EFFECT
+ self.set_orientation(Gtk.Orientation.VERTICAL)
builder = Gtk.Builder()
builder.add_from_file(os.path.join(get_ui_dir(), "effectslibrary.ui"))
builder.connect_signals(self)
diff --git a/pitivi/mainwindow.py b/pitivi/mainwindow.py
index f6e1cfc..c92c4a2 100644
--- a/pitivi/mainwindow.py
+++ b/pitivi/mainwindow.py
@@ -838,7 +838,8 @@ class PitiviMainWindow(Gtk.ApplicationWindow, Loggable):
"your changes will be lost.")
# put the text in a vbox
- vbox = Gtk.VBox(homogeneous=False, spacing=SPACING * 2)
+ vbox = Gtk.Box(homogeneous=False, spacing=SPACING * 2)
+ vbox.set_orientation(Gtk.Orientation.VERTICAL)
vbox.pack_start(primary, True, True, 0)
vbox.pack_start(secondary, True, True, 0)
diff --git a/pitivi/mediafilespreviewer.py b/pitivi/mediafilespreviewer.py
index 86fb741..a8895d9 100644
--- a/pitivi/mediafilespreviewer.py
+++ b/pitivi/mediafilespreviewer.py
@@ -159,7 +159,8 @@ class PreviewWidget(Gtk.Grid, Loggable):
self.attach(self.l_tags, 0, 3, 1, 1)
# Error handling
- vbox = Gtk.VBox()
+ vbox = Gtk.Box()
+ vbox.set_orientation(Gtk.Orientation.VERTICAL)
vbox.set_spacing(SPACING)
self.l_error = Gtk.Label(label=_("Pitivi can not preview this file."))
self.b_details = Gtk.Button.new_with_label(_("More info"))
diff --git a/pitivi/medialibrary.py b/pitivi/medialibrary.py
index 702756e..c35527a 100644
--- a/pitivi/medialibrary.py
+++ b/pitivi/medialibrary.py
@@ -109,7 +109,7 @@ SUPPORTED_FILE_FORMATS = {
OTHER_KNOWN_FORMATS = ("video/mp2t",)
-class MediaLibraryWidget(Gtk.VBox, Loggable):
+class MediaLibraryWidget(Gtk.Box, Loggable):
""" Widget for listing sources """
@@ -118,7 +118,7 @@ class MediaLibraryWidget(Gtk.VBox, Loggable):
(GObject.TYPE_PYOBJECT,))}
def __init__(self, app, uiman):
- Gtk.VBox.__init__(self)
+ Gtk.Box.__init__(self)
Loggable.__init__(self)
self.pending_rows = []
@@ -132,6 +132,7 @@ class MediaLibraryWidget(Gtk.VBox, Loggable):
self.clip_view = self.app.settings.lastClipView
self.import_start_time = time.time()
+ self.set_orientation(Gtk.Orientation.VERTICAL)
builder = Gtk.Builder()
builder.add_from_file(os.path.join(get_ui_dir(), "medialibrary.ui"))
builder.connect_signals(self)
diff --git a/pitivi/project.py b/pitivi/project.py
index ea362ac..d3c78da 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -368,7 +368,8 @@ class ProjectManager(GObject.Object, Loggable):
primary.props.label = message
# put the text in a vbox
- vbox = Gtk.VBox(homogeneous=False, spacing=SPACING * 2)
+ vbox = Gtk.Box(homogeneous=False, spacing=SPACING * 2)
+ vbox.set_orientation(Gtk.Orientation.VERTICAL)
vbox.pack_start(primary, True, True, 0)
# make the [[image] text] hbox
diff --git a/pitivi/timeline/elements.py b/pitivi/timeline/elements.py
index 4766972..646a923 100644
--- a/pitivi/timeline/elements.py
+++ b/pitivi/timeline/elements.py
@@ -826,7 +826,8 @@ class KeyframeMenu(GtkClutter.Actor):
def __init__(self, keyframe):
GtkClutter.Actor.__init__(self)
self.keyframe = keyframe
- vbox = Gtk.VBox()
+ vbox = Gtk.Box()
+ vbox.set_orientation(Gtk.Orientation.VERTICAL)
button = Gtk.Button()
button.set_label("Remove")
diff --git a/pitivi/timeline/layer.py b/pitivi/timeline/layer.py
index 0174f35..5a11f24 100644
--- a/pitivi/timeline/layer.py
+++ b/pitivi/timeline/layer.py
@@ -32,8 +32,7 @@ from pitivi.utils.ui import LAYER_CONTROL_TARGET_ENTRY
# TODO GTK3 port to GtkGrid
-class BaseLayerControl(Gtk.VBox, Loggable):
-
+class BaseLayerControl(Gtk.Box, Loggable):
"""
Base Layer control classes
"""
@@ -41,7 +40,7 @@ class BaseLayerControl(Gtk.VBox, Loggable):
__gtype_name__ = 'LayerControl'
def __init__(self, control_container, layer, layer_type, app):
- Gtk.VBox.__init__(self, spacing=0)
+ Gtk.Box.__init__(self, spacing=0)
Loggable.__init__(self)
self._app = app
@@ -59,6 +58,8 @@ class BaseLayerControl(Gtk.VBox, Loggable):
self.SELECTED_COLOR = context.get_background_color(
Gtk.StateFlags.SELECTED)
+ self.set_orientation(Gtk.Orientation.VERTICAL)
+
table = Gtk.Table(n_rows=2, n_columns=2)
table.set_border_width(2)
table.set_row_spacings(3)
@@ -289,7 +290,6 @@ class BaseLayerControl(Gtk.VBox, Loggable):
class VideoLayerControl(BaseLayerControl):
-
"""
Layer control class for video layers
"""
@@ -317,7 +317,6 @@ class VideoLayerControl(BaseLayerControl):
class AudioLayerControl(BaseLayerControl):
-
"""
Layer control class for audio layers
"""
@@ -349,7 +348,6 @@ class AudioLayerControl(BaseLayerControl):
class TwoStateButton(Gtk.Button):
-
"""
Button with two states and according labels/images
"""
@@ -379,7 +377,6 @@ class TwoStateButton(Gtk.Button):
class SpacedSeparator(Gtk.EventBox):
-
"""
A Separator with vertical spacing
@@ -389,7 +386,8 @@ class SpacedSeparator(Gtk.EventBox):
def __init__(self):
Gtk.EventBox.__init__(self)
- self.box = Gtk.VBox()
+ self.box = Gtk.Box()
+ self.box.set_orientation(Gtk.Orientation.VERTICAL)
self.box.add(Gtk.HSeparator())
self.box.set_border_width(6)
diff --git a/pitivi/transitions.py b/pitivi/transitions.py
index 1d09984..48587a6 100644
--- a/pitivi/transitions.py
+++ b/pitivi/transitions.py
@@ -40,7 +40,7 @@ from pitivi.utils.ui import SPACING
COL_ICON) = list(range(4))
-class TransitionsListWidget(Gtk.VBox, Loggable):
+class TransitionsListWidget(Gtk.Box, Loggable):
"""
Widget for configuring the selected transition.
@@ -49,7 +49,7 @@ class TransitionsListWidget(Gtk.VBox, Loggable):
"""
def __init__(self, app):
- Gtk.VBox.__init__(self)
+ Gtk.Box.__init__(self)
Loggable.__init__(self)
self.app = app
@@ -57,6 +57,7 @@ class TransitionsListWidget(Gtk.VBox, Loggable):
self._pixdir = os.path.join(get_pixmap_dir(), "transitions")
icon_theme = Gtk.IconTheme.get_default()
self._question_icon = icon_theme.load_icon("dialog-question", 48, 0)
+ self.set_orientation(Gtk.Orientation.VERTICAL)
# Tooltip handling
self._current_transition_name = None
@@ -72,7 +73,8 @@ class TransitionsListWidget(Gtk.VBox, Loggable):
self.searchEntry.set_placeholder_text(_("Search..."))
self.searchbar.pack_end(self.searchEntry, True, True, 0)
- self.props_widgets = Gtk.VBox()
+ self.props_widgets = Gtk.Box()
+ self.props_widgets.set_orientation(Gtk.Orientation.VERTICAL)
borderTable = Gtk.Table(n_rows=2, n_columns=3)
self.border_mode_normal = Gtk.RadioButton(
diff --git a/pitivi/utils/widgets.py b/pitivi/utils/widgets.py
index ea59ee4..9632469 100644
--- a/pitivi/utils/widgets.py
+++ b/pitivi/utils/widgets.py
@@ -575,20 +575,21 @@ class FontWidget(Gtk.FontButton, DynamicWidget):
return self.get_font_name()
-class GstElementSettingsWidget(Gtk.VBox, Loggable):
+class GstElementSettingsWidget(Gtk.Box, Loggable):
"""
Widget to view/modify properties of a Gst.Element
"""
def __init__(self, isControllable=True):
- Gtk.VBox.__init__(self)
+ Gtk.Box.__init__(self)
Loggable.__init__(self)
self.element = None
self.ignore = None
self.properties = None
self.buttons = {}
self.isControllable = isControllable
+ self.set_orientation(Gtk.Orientation.VERTICAL)
def resetKeyframeToggleButtons(self, widget=None):
"""
diff --git a/pitivi/viewer.py b/pitivi/viewer.py
index 53c0f58..b30917e 100644
--- a/pitivi/viewer.py
+++ b/pitivi/viewer.py
@@ -73,7 +73,7 @@ GlobalSettings.addConfigOption("pointColor", section="viewer",
default='49a0e0')
-class ViewerContainer(Gtk.VBox, Loggable):
+class ViewerContainer(Gtk.Box, Loggable):
"""
A wiget holding a viewer and the controls.
@@ -87,7 +87,7 @@ class ViewerContainer(Gtk.VBox, Loggable):
INHIBIT_REASON = _("Currently playing")
def __init__(self, app):
- Gtk.VBox.__init__(self)
+ Gtk.Box.__init__(self)
self.set_border_width(SPACING)
self.app = app
self.settings = app.settings
@@ -186,6 +186,8 @@ class ViewerContainer(Gtk.VBox, Loggable):
def _createUi(self):
""" Creates the Viewer GUI """
+ self.set_orientation(Gtk.Orientation.VERTICAL)
+
# Drawing area
self.internal = ViewerWidget(
self.app.settings, realizedCb=self._videoRealizedCb)
@@ -194,7 +196,8 @@ class ViewerContainer(Gtk.VBox, Loggable):
self.pack_start(self.internal, True, True, 0)
self.external_window = Gtk.Window()
- vbox = Gtk.VBox()
+ vbox = Gtk.Box()
+ vbox.set_orientation(Gtk.Orientation.VERTICAL)
vbox.set_spacing(SPACING)
self.external_window.add(vbox)
self.external = ViewerWidget(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]