[pitivi: 2/5] ui.sourcelist: hide drag icon when pointer moves over timeline



commit 75d48a9c5d4128618bd47e456f1a30e99987f85d
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date:   Wed Apr 15 12:19:34 2009 -0700

    ui.sourcelist: hide drag icon when pointer moves over timeline
---
 pitivi/pixmaps/invisible.png |  Bin 0 -> 177 bytes
 pitivi/ui/sourcelist.py      |    6 +++++-
 pitivi/ui/timeline.py        |    1 -
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/pitivi/pixmaps/invisible.png b/pitivi/pixmaps/invisible.png
new file mode 100644
index 0000000..eee7885
Binary files /dev/null and b/pitivi/pixmaps/invisible.png differ
diff --git a/pitivi/ui/sourcelist.py b/pitivi/ui/sourcelist.py
index 4636de8..ef7d272 100644
--- a/pitivi/ui/sourcelist.py
+++ b/pitivi/ui/sourcelist.py
@@ -78,6 +78,9 @@ ui = '''
 </ui>
 '''
 
+INVISIBLE = gtk.gdk.pixbuf_new_from_file(os.path.join(get_pixmap_dir(), 
+    "invisible.png"))
+
 def beautify_stream(stream):
 
     if type(stream) == AudioStream:
@@ -710,13 +713,14 @@ class SourceList(gtk.VBox, Loggable):
         model, rows = self.treeview.get_selection().get_selected_rows()
         return [model[path][COL_URI] for path in rows]
 
-    def _dndDataGetCb(self, unused_widget, unused_context, selection,
+    def _dndDataGetCb(self, unused_widget, context, selection,
                       targettype, unused_eventtime):
         self.info("data get, type:%d", targettype)
         uris = self.getSelectedItems()
         if len(uris) < 1:
             return
         selection.set(selection.target, 8, '\n'.join(uris))
+        context.set_icon_pixbuf(INVISIBLE, 0, 0)
 
 class InfoStub(gtk.HBox, Loggable):
     """
diff --git a/pitivi/ui/timeline.py b/pitivi/ui/timeline.py
index 9ee11fe..f6ba65a 100644
--- a/pitivi/ui/timeline.py
+++ b/pitivi/ui/timeline.py
@@ -216,7 +216,6 @@ class Timeline(gtk.Table, Loggable, Zoomable):
         self.connect("drag-drop", self._dragDropCb)
         self.connect("drag-motion", self._dragMotionCb)
 
-
     def _timelineControlsTrackExpandedCb(self, timeline_controls,
             track, expanded):
         self._canvas.setExpanded(track, expanded)



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