[pitivi] trackobject.py: hide trim handles when not focused



commit bc5d2955b9ba79da63f9abb8821623c907ef3c58
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date:   Thu Sep 3 17:31:29 2009 -0700

    trackobject.py: hide trim handles when not focused

 pitivi/ui/trackobject.py |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/pitivi/ui/trackobject.py b/pitivi/ui/trackobject.py
index 9f99a97..940e31c 100644
--- a/pitivi/ui/trackobject.py
+++ b/pitivi/ui/trackobject.py
@@ -155,6 +155,7 @@ class TrimHandle(View, goocanvas.Image, Zoomable):
         goocanvas.Image.__init__(self,
             pixbuf = TRIMBAR_PIXBUF,
             line_width=0,
+            pointer_events=goocanvas.EVENTS_FILL,
             **kwargs
         )
         View.__init__(self)
@@ -272,7 +273,7 @@ class TrackObject(View, goocanvas.Group, Zoomable):
 
         self.element = element
         self.settings = instance.settings
-        self.normal()
+        self.unfocus()
 
 ## Properties
 
@@ -315,12 +316,12 @@ class TrackObject(View, goocanvas.Group, Zoomable):
 ## Public API
 
     def focus(self):
-        self.start_handle.focus()
-        self.end_handle.focus()
+        self.start_handle.props.visibility = goocanvas.ITEM_VISIBLE
+        self.end_handle.props.visibility = goocanvas.ITEM_VISIBLE
 
     def unfocus(self):
-        self.start_handle.unfocus()
-        self.end_handle.unfocus()
+        self.start_handle.props.visibility = goocanvas.ITEM_INVISIBLE
+        self.end_handle.props.visibility = goocanvas.ITEM_INVISIBLE
 
     def zoomChanged(self):
         self._update()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]