[pitivi] pitivi: Allow transitions to be resized.
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] pitivi: Allow transitions to be resized.
- Date: Thu, 11 Jun 2015 09:20:50 +0000 (UTC)
commit 92aafec5f1252e6502d5715ff234b9f34bb6f7b5
Author: Thibault Saunier <tsaunier gnome org>
Date: Mon Jun 1 10:17:00 2015 +0200
pitivi: Allow transitions to be resized.
Adding handles on them
Fixes http://phabricator.freedesktop.org/T80
pitivi/mainwindow.py | 2 +-
pitivi/timeline/elements.py | 16 +++++++++++++++-
pitivi/viewer.py | 2 +-
3 files changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/mainwindow.py b/pitivi/mainwindow.py
index 95d58e5..6c2f67a 100644
--- a/pitivi/mainwindow.py
+++ b/pitivi/mainwindow.py
@@ -585,7 +585,7 @@ class PitiviMainWindow(Gtk.ApplicationWindow, Loggable):
self._saveProjectCb(None, None)
def saveProjectAsDialog(self):
- sellf._saveProjectAsCb(None, None)
+ self._saveProjectAsCb(None, None)
def _revertToSavedProjectCb(self, unused_action):
return self.app.project_manager.revertToSavedProject()
diff --git a/pitivi/timeline/elements.py b/pitivi/timeline/elements.py
index 8429286..bdc7952 100644
--- a/pitivi/timeline/elements.py
+++ b/pitivi/timeline/elements.py
@@ -845,7 +845,21 @@ class TransitionClip(Clip):
self.bClip.connect("child-added", self._childAddedCb)
# In the case of TransitionClips, we are the only container
- self._elements_container = self
+ overlay = Gtk.Overlay()
+ self.add(overlay)
+
+ self._elements_container = Gtk.Box.new(Gtk.Orientation.VERTICAL, 2)
+ overlay.add_overlay(self._elements_container)
+
+ self.leftHandle = TrimHandle(self, GES.Edge.EDGE_START)
+ overlay.add_overlay(self.leftHandle)
+
+ self.rightHandle = TrimHandle(self, GES.Edge.EDGE_END)
+ overlay.add_overlay(self.rightHandle)
+
+ self.handles.append(self.leftHandle)
+ self.handles.append(self.rightHandle)
+
self.set_tooltip_markup("<span>%s</span>" %
str(bClip.props.vtype.value_nick))
diff --git a/pitivi/viewer.py b/pitivi/viewer.py
index 241f31a..eff8627 100644
--- a/pitivi/viewer.py
+++ b/pitivi/viewer.py
@@ -415,7 +415,7 @@ class ViewerContainer(Gtk.Box, Loggable):
"""
While a clip is being trimmed, show a live preview of it.
"""
- if isinstance(clip, GES.TitleClip) or clip.props.is_image or not hasattr(clip, "get_uri"):
+ if not hasattr(clip, "get_uri") or isinstance(clip, GES.TitleClip) or clip.props.is_image:
self.log(
"%s is an image or has no URI, so not previewing trim" % clip)
return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]