[pitivi] layer: Fix segfault on GTK 3.20
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] layer: Fix segfault on GTK 3.20
- Date: Sat, 16 Apr 2016 14:10:11 +0000 (UTC)
commit 62e5a852f905847e98cc653bc9e06fc8b57ab899
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Sat Apr 16 11:39:19 2016 +0200
layer: Fix segfault on GTK 3.20
The Layer's do_draw method was not calling EventBox's do_draw method
and this caused the segfault .. somehow.
Removed the method since it was not doing anything useful.
Fixes https://phabricator.freedesktop.org/T7373
Differential Revision: https://phabricator.freedesktop.org/D912
pitivi/timeline/layer.py | 3 ---
pitivi/timeline/timeline.py | 14 ++++++++------
2 files changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/pitivi/timeline/layer.py b/pitivi/timeline/layer.py
index f17ebc9..341126a 100644
--- a/pitivi/timeline/layer.py
+++ b/pitivi/timeline/layer.py
@@ -497,6 +497,3 @@ class Layer(Gtk.EventBox, timelineUtils.Zoomable, Loggable):
for ges_clip in self.ges_layer.get_clips():
if hasattr(ges_clip, "ui"):
ges_clip.ui.updatePosition()
-
- def do_draw(self, cr):
- Gtk.Box.do_draw(self, cr)
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index b9d6b45..0b71b75 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -246,6 +246,7 @@ class Timeline(Gtk.EventBox, Zoomable, Loggable):
self.layout.props.can_focus = True
self.layout.props.can_default = True
self.__layers_vbox = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
+ self.__layers_vbox.get_style_context().add_class("LayersBox")
self.__layers_vbox.props.width_request = self.get_allocated_width()
self.__layers_vbox.props.height_request = self.get_allocated_height()
self.layout.put(self.__layers_vbox, 0, 0)
@@ -919,12 +920,13 @@ class Timeline(Gtk.EventBox, Zoomable, Loggable):
# Check the media types so the controls are set up properly.
layer.checkMediaTypes()
- layer_widget = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
- layer_widget.pack_start(layer.before_sep, False, False, 0)
- layer_widget.pack_start(layer, True, True, 0)
- layer_widget.pack_start(layer.after_sep, False, False, 0)
- layer_widget.show_all()
- self.__layers_vbox.pack_start(layer_widget, True, True, 0)
+ layer_box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL)
+ layer_box.get_style_context().add_class("LayerBox")
+ layer_box.pack_start(layer.before_sep, False, False, 0)
+ layer_box.pack_start(layer, True, True, 0)
+ layer_box.pack_start(layer.after_sep, False, False, 0)
+ layer_box.show_all()
+ self.__layers_vbox.pack_start(layer_box, True, True, 0)
ges_layer.connect("notify::priority", self.__layerPriorityChangedCb)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]