[pitivi: 9/13] Fix exception if something != dnd.TYPE_PITIVI_FILESOURCE is dragged on the timeline.



commit f4aee286c5badd815f5a40835c14bfb7321d80c8
Author: Alessandro Decina <alessandro d gmail com>
Date:   Mon Mar 1 21:27:48 2010 +0100

    Fix exception if something != dnd.TYPE_PITIVI_FILESOURCE is dragged on the timeline.

 pitivi/ui/timeline.py |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/ui/timeline.py b/pitivi/ui/timeline.py
index 1beda12..d1d7dbb 100644
--- a/pitivi/ui/timeline.py
+++ b/pitivi/ui/timeline.py
@@ -427,10 +427,11 @@ class Timeline(gtk.Table, Loggable, Zoomable):
         # tell current project to import the uri
         # wait for source-added signal, meanwhile ignore dragMotion signals
         # when ready, add factories to the timeline.
-        if targetType == dnd.TYPE_PITIVI_FILESOURCE:
-            uris = selection.data.split("\n")
-        else:
+        if targetType != dnd.TYPE_PITIVI_FILESOURCE:
             context.finish(False, False, timestamp)
+            return
+
+        uris = selection.data.split("\n")
         self._factories = [self.project.sources.getUri(uri) for uri in uris]
         context.drag_status(gtk.gdk.ACTION_COPY, timestamp)
         return True



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