[pitivi: 6/16] Pass event args to drag_start and drag_end.
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Subject: [pitivi: 6/16] Pass event args to drag_start and drag_end.
- Date: Wed, 8 Jul 2009 14:37:26 +0000 (UTC)
commit 84d97cc4630949d3003a803a2fdc3fe480c47335
Author: Alessandro Decina <alessandro d gmail com>
Date: Fri Jul 3 18:32:58 2009 +0200
Pass event args to drag_start and drag_end.
pitivi/ui/controller.py | 8 ++++----
pitivi/ui/curve.py | 6 ++----
pitivi/ui/trackobject.py | 28 ++++++++++++++--------------
3 files changed, 20 insertions(+), 22 deletions(-)
---
diff --git a/pitivi/ui/controller.py b/pitivi/ui/controller.py
index a32aae3..caba1b6 100644
--- a/pitivi/ui/controller.py
+++ b/pitivi/ui/controller.py
@@ -141,13 +141,13 @@ class Controller(object):
self._last_event = event
def _drag_start(self, item, target, event):
- self.drag_start()
+ self.drag_start(item, target, event)
def _drag_end(self, item, target, event):
self._pending_drag_start = None
pending_drag_end, self._pending_drag_end = self._pending_drag_end, False
if pending_drag_end:
- self.drag_end()
+ self.drag_end(item, target, event)
if self._ptr_within and self._drag_threshold():
point = self.from_item_event(item, event)
@@ -172,10 +172,10 @@ class Controller(object):
def double_click(self, pos):
pass
- def drag_start(self):
+ def drag_start(self, item, target, event):
pass
- def drag_end(self):
+ def drag_end(self, item, target, event):
pass
def set_pos(self, obj, pos):
diff --git a/pitivi/ui/curve.py b/pitivi/ui/curve.py
index ee02a01..ecffa34 100644
--- a/pitivi/ui/curve.py
+++ b/pitivi/ui/curve.py
@@ -51,7 +51,7 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable):
class Controller(Controller):
- def _drag_start(self, item, target, event):
+ def drag_start(self, item, target, event):
initial = self.from_item_event(item, event)
self._kf = self._view.findKeyframe(initial)
if self._kf:
@@ -60,10 +60,8 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable):
# we are moving the entire curve, so we need to know the
# inital position of each keyframe
self._offsets = dict(self._view.keyframes)
- Controller._drag_start(self, item, target, event)
- def _drag_end(self, item, target, event):
- Controller._drag_end(self, item, target, event)
+ def drag_end(self, item, target, event):
self._kf = None
def set_pos(self, obj, pos):
diff --git a/pitivi/ui/trackobject.py b/pitivi/ui/trackobject.py
index 148c562..ec6ad83 100644
--- a/pitivi/ui/trackobject.py
+++ b/pitivi/ui/trackobject.py
@@ -98,10 +98,10 @@ class TimelineController(controller.Controller):
def leave(self, unused, unused2):
self._view.unfocus()
- def drag_start(self):
+ def drag_start(self, item, target, event):
pass
- def drag_end(self):
+ def drag_end(self, item, target, event):
self._view.timeline.rebuildEdges()
class TrimHandle(View, goocanvas.Image, Zoomable):
@@ -137,12 +137,12 @@ class StartHandle(TrimHandle):
_cursor = LEFT_SIDE
- def drag_start(self):
- TimelineController.drag_start(self)
+ def drag_start(self, item, target, event):
+ TimelineController.drag_start(self, item, target, event)
self._view.app.action_log.begin("trim object")
- def drag_end(self):
- TimelineController.drag_end(self)
+ def drag_end(self, item, target, event):
+ TimelineController.drag_end(self, item, target, event)
self._view.app.action_log.commit()
def set_pos(self, obj, pos):
@@ -157,12 +157,12 @@ class EndHandle(TrimHandle):
_cursor = RIGHT_SIDE
- def drag_start(self):
- TimelineController.drag_start(self)
+ def drag_start(self, item, target, event):
+ TimelineController.drag_start(self, item, target, event)
self._view.app.action_log.begin("trim object")
- def drag_end(self):
- TimelineController.drag_end(self)
+ def drag_end(self, item, target, event):
+ TimelineController.drag_end(self, item, target, event)
self._view.app.action_log.commit()
def set_pos(self, obj, pos):
@@ -176,8 +176,8 @@ class TrackObject(View, goocanvas.Group, Zoomable):
class Controller(TimelineController):
- def drag_start(self):
- TimelineController.drag_start(self)
+ def drag_start(self, item, target, event):
+ TimelineController.drag_start(self, item, target, event)
self._view.app.action_log.begin("move clip")
self._view.timeline.disableUpdates()
self._view.raise_(None)
@@ -206,8 +206,8 @@ class TrackObject(View, goocanvas.Group, Zoomable):
self._offsets[obj] = start, priority
del self._offsets[element]
- def drag_end(self):
- TimelineController.drag_end(self)
+ def drag_end(self, item, target, event):
+ TimelineController.drag_end(self, item, target, event)
self._view.timeline.enableUpdates()
self._view.app.action_log.commit()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]