[pitivi] timeline: Set the mouse field in the constructor
- From: Mathieu Duponchelle <mathieudu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] timeline: Set the mouse field in the constructor
- Date: Fri, 28 Feb 2014 03:11:14 +0000 (UTC)
commit 421a2a379e3584d3ba8aef40b07ff974e75c26d4
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Sun Feb 16 04:52:18 2014 +0100
timeline: Set the mouse field in the constructor
pitivi/timeline/timeline.py | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index 904e9a3..171dabe 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -108,7 +108,7 @@ class TimelineStage(Clutter.ScrollActor, Zoomable, Loggable):
self.lastPosition = 0 # Saved for redrawing when paused
self._createPlayhead()
self._createSnapIndicator()
- self._peekMouse()
+ self.mouse = self._peekMouse()
self._setUpDragAndDrop()
# Public API
@@ -322,11 +322,9 @@ class TimelineStage(Clutter.ScrollActor, Zoomable, Loggable):
def _peekMouse(self):
manager = Clutter.DeviceManager.get_default()
-
for device in manager.peek_devices():
if device.props.device_type == Clutter.InputDeviceType.POINTER_DEVICE and device.props.enabled
is True:
- self.mouse = device
- break
+ return device
def _createGhostclip(self, trackType, asset):
ghostclip = Ghostclip(trackType)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]