[pitivi] Re-enables live trimming preview
- From: Jean-François Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Re-enables live trimming preview
- Date: Wed, 24 Apr 2013 18:03:11 +0000 (UTC)
commit 0138fc6982f48f34807092b3cd6b891b99caf6bc
Author: Mathieu Duponchelle <mathieu duponchelle epitech eu>
Date: Thu Apr 18 03:12:43 2013 +0200
Re-enables live trimming preview
pitivi/timeline/elements.py | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/timeline/elements.py b/pitivi/timeline/elements.py
index dab2a4f..da25b1a 100644
--- a/pitivi/timeline/elements.py
+++ b/pitivi/timeline/elements.py
@@ -256,6 +256,9 @@ class TrimHandle(Clutter.Texture):
set([]),
None)
+ self._context.connect("clip-trim", self.clipTrimCb)
+ self._context.connect("clip-trim-finished", self.clipTrimFinishedCb)
+
def _dragProgressCb(self, action, actor, delta_x, delta_y):
# We can't use delta_x here because it fluctuates weirdly.
coords = self.dragAction.get_motion_coords()
@@ -276,6 +279,14 @@ class TrimHandle(Clutter.Texture):
self.set_from_file(os.path.join(configure.get_pixmap_dir(), "trimbar-normal.png"))
self.timelineElement.timeline._container.embed.get_window().set_cursor(Gdk.Cursor.new(Gdk.CursorType.ARROW))
+ def clipTrimCb(self, unused_TrimStartContext, tl_obj, position):
+ # While a clip is being trimmed, ask the viewer to preview it
+ self.timelineElement.timeline._container.app.gui.viewer.clipTrimPreview(tl_obj, position)
+
+ def clipTrimFinishedCb(self, unused_TrimStartContext):
+ # When a clip has finished trimming, tell the viewer to reset itself
+ self.timelineElement.timeline._container.app.gui.viewer.clipTrimPreviewFinished()
+
class TimelineElement(Clutter.Actor, Zoomable):
def __init__(self, bElement, track, timeline):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]