[pitivi] timeline: Make the size_group argument mandatory



commit 89f2baaaa655aa8c96eae4a188b080b19b08a995
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Wed Nov 2 12:31:32 2016 +0100

    timeline: Make the size_group argument mandatory
    
    Reviewed-by: Thibault Saunier <tsaunier gnome org>
    Differential Revision: https://phabricator.freedesktop.org/D1438

 pitivi/timeline/timeline.py |    5 ++---
 tests/test_undo_timeline.py |    2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index e0e1dda..ec92a8f 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -313,7 +313,7 @@ class Timeline(Gtk.EventBox, Zoomable, Loggable):
 
     __gtype_name__ = "PitiviTimeline"
 
-    def __init__(self, app, size_group=None):
+    def __init__(self, app, size_group):
         Gtk.EventBox.__init__(self)
         Zoomable.__init__(self)
         Loggable.__init__(self)
@@ -337,8 +337,7 @@ class Timeline(Gtk.EventBox, Zoomable, Loggable):
         self._layers_controls_vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
         self._layers_controls_vbox.props.hexpand = False
         self._layers_controls_vbox.props.valign = Gtk.Align.START
-        if size_group:
-            size_group.add_widget(self._layers_controls_vbox)
+        size_group.add_widget(self._layers_controls_vbox)
 
         # Stuff the layers controls in a viewport so it can be scrolled.
         viewport = Gtk.Viewport(vadjustment=self.vadj)
diff --git a/tests/test_undo_timeline.py b/tests/test_undo_timeline.py
index c31eb0f..f4096c6 100644
--- a/tests/test_undo_timeline.py
+++ b/tests/test_undo_timeline.py
@@ -162,7 +162,7 @@ class TestLayerObserver(BaseTestUndoTimeline):
         layer3 = self.timeline.append_layer()
         self.assertEqual(self.timeline.get_layers(), [layer1, layer2, layer3])
 
-        timeline_ui = Timeline(app=self.app)
+        timeline_ui = Timeline(app=self.app, size_group=mock.Mock())
         timeline_ui.setProject(self.app.project_manager.current_project)
 
         # Click and drag a layer control box to move the layer.


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