[pitivi] timeline: Clarify why the Timeline is an EventBox
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] timeline: Clarify why the Timeline is an EventBox
- Date: Wed, 9 Nov 2016 13:14:08 +0000 (UTC)
commit 5bd8948ca0366e6a52d6b652bee067d629999df1
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Mon Oct 31 13:24:11 2016 +0100
timeline: Clarify why the Timeline is an EventBox
Reviewed-by: Thibault Saunier <tsaunier gnome org>
Differential Revision: https://phabricator.freedesktop.org/D1431
pitivi/timeline/timeline.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index b4543b4..dea139f 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -315,7 +315,11 @@ class Timeline(Gtk.EventBox, Zoomable, Loggable):
self.props.expand = True
self.get_accessible().set_name("timeline canvas")
- # A lot of operations go through these callbacks.
+ # A window is needed to receive BUTTON_* events. This is the reason why
+ # Timeline is a Gtk.EventBox subclass and not directly a Gtk.Box,
+ # see `hbox` above.
+ assert self.get_has_window()
+ # A lot of operations go through the handlers of these events.
self.add_events(Gdk.EventType.BUTTON_PRESS | Gdk.EventType.BUTTON_RELEASE)
# Whether the entire timeline content is in view and
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]