[pitivi] timeline: Fix warnings about scrollbars



commit 2c01993cdc10fd5056c94b30b300927cf41264a3
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Tue Nov 1 19:09:56 2016 +0100

    timeline: Fix warnings about scrollbars
    
    For example:
    (pitivi:3): Gtk-WARNING **: GtkHScrollbar 0x1cf6830 is drawn without a current allocation. This should 
not happen.
    (pitivi:3): Gtk-WARNING **: GtkVScrollbar 0x1cf6630 is drawn without a current allocation. This should 
not happen.
    
    Reviewed-by: Thibault Saunier <tsaunier gnome org>
    Differential Revision: https://phabricator.freedesktop.org/D1437

 pitivi/timeline/timeline.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 032713c..e0e1dda 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -1427,9 +1427,12 @@ class TimelineContainer(Gtk.Grid, Zoomable, Loggable):
 
         self.attach(zoom_box, 0, 0, 1, 1)
         self.attach(self.ruler, 1, 0, 1, 1)
-        self.attach(self.timeline, 0, 1, 2, 1)
         self.attach(vscrollbar, 2, 1, 1, 1)
         self.attach(hscrollbar, 1, 2, 1, 1)
+        # Make sure the timeline is attached after the scrollbars, otherwise
+        # a lot of warnings are printed because they are drawn before being
+        # allocated a size, for some reason.
+        self.attach(self.timeline, 0, 1, 2, 1)
         self.attach(self.toolbar, 3, 1, 1, 1)
 
         min_height = (self.ruler.get_size_request()[1] +


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