[pitivi] timeline: Clarify what's being used in _scrollEventCb
- From: Jean-François Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] timeline: Clarify what's being used in _scrollEventCb
- Date: Thu, 9 Oct 2014 02:06:55 +0000 (UTC)
commit 34d172eb80891ca7bc7ccd0a564fa2de359b540c
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Wed Oct 1 20:24:34 2014 +0200
timeline: Clarify what's being used in _scrollEventCb
pitivi/timeline/timeline.py | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 0fa5875..79ffd7c 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -1382,22 +1382,22 @@ class TimelineContainer(Gtk.Grid, Zoomable, Loggable):
self._setBestZoomRatio(allow_zoom_in=True)
def _scrollEventCb(self, unused_embed, event):
- deltas = event.get_scroll_deltas()
+ unused_res, delta_x, delta_y = event.get_scroll_deltas()
if event.state & Gdk.ModifierType.CONTROL_MASK:
- if deltas[2] < 0:
+ if delta_y < 0:
Zoomable.zoomIn()
- elif deltas[2] > 0:
+ elif delta_y > 0:
Zoomable.zoomOut()
self._scrollToPlayhead()
elif event.state & Gdk.ModifierType.SHIFT_MASK:
- if deltas[2] > 0:
+ if delta_y > 0:
self.scroll_down()
- elif deltas[2] < 0:
+ elif delta_y < 0:
self.scroll_up()
else:
- if deltas[2] > 0:
+ if delta_y > 0:
self.scroll_right()
- elif deltas[2] < 0:
+ elif delta_y < 0:
self.scroll_left()
self.scrolled += 1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]