[pitivi] Fix the hiding of clip trimming handles
- From: Jean-François Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Fix the hiding of clip trimming handles
- Date: Wed, 24 Apr 2013 18:03:46 +0000 (UTC)
commit f34d28255bbb256a24a52afbdf9cd85113a559eb
Author: Mathieu Duponchelle <mathieu duponchelle epitech eu>
Date: Thu Apr 18 05:12:09 2013 +0200
Fix the hiding of clip trimming handles
pitivi/timeline/elements.py | 15 ++++++++++++++-
1 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/timeline/elements.py b/pitivi/timeline/elements.py
index 9fa9ba6..55da42c 100644
--- a/pitivi/timeline/elements.py
+++ b/pitivi/timeline/elements.py
@@ -244,6 +244,16 @@ class TrimHandle(Clutter.Texture):
def _leaveEventCb(self, actor, event):
self.timelineElement.set_reactive(True)
+
+ actor = self.timelineElement.timeline._container.stage.get_actor_at_pos(Clutter.PickMode.ALL,
event.x, event.y)
+ try:
+ element = actor.bElement
+ if element != self.timelineElement.bELement and not self.isSelected:
+ self.timelineElement.hideHandles()
+ except AttributeError:
+ if not self.isSelected:
+ self.timelineElement.hideHandles()
+
for elem in self.timelineElement.get_children():
elem.set_reactive(True)
self.set_from_file(os.path.join(configure.get_pixmap_dir(), "trimbar-normal.png"))
@@ -261,7 +271,6 @@ class TrimHandle(Clutter.Texture):
self.props.visible = isSelected
def _dragBeginCb(self, action, actor, event_x, event_y, modifiers):
- print "trim handle dragged"
self.dragBeginStartX = event_x
self.dragBeginStartY = event_y
elem = self.timelineElement.bElement.get_parent()
@@ -481,6 +490,10 @@ class URISourceElement(TimelineElement):
# public API
+ def hideHandles(self):
+ self.rightHandle.hide()
+ self.leftHandle.hide()
+
# private API
def _createGhostclip(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]