[pitivi/ges: 153/287] mainwindow: Handle DND in the viewer properly after GES port



commit 04bcce10558ba769e515f67119d924e939c8cb4d
Author: Thibault Saunier <thibault saunier collabora com>
Date:   Mon Jan 9 11:19:52 2012 -0300

    mainwindow: Handle DND in the viewer properly after GES port

 pitivi/ui/mainwindow.py |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/pitivi/ui/mainwindow.py b/pitivi/ui/mainwindow.py
index 077e58e..4945a71 100644
--- a/pitivi/ui/mainwindow.py
+++ b/pitivi/ui/mainwindow.py
@@ -1083,13 +1083,14 @@ class PitiviMainWindow(gtk.Window, Loggable):
             context.finish(False, False, ctime)
             return
 
-        # Use factory from our source list if we have the given uri
         try:
-            fact = self.project.sources.getInfoFromUri(uri)
+            info = self.project.sources.getInfoFromUri(uri)
         except SourceListError:
-            from pitivi.factories.file import FileSourceFactory
-            fact = FileSourceFactory(uri)
-        self._viewUri(fact)
+            self.project.sources.addUri(uri)
+            # FIXME Add a delay/catch signal when we start doing the discovering
+            # async
+            info = self.project.sources.getInfoFromUri(uri)
+        self._viewUri(info.get_uri())
         context.finish(True, False, ctime)
 
     def _leavePreviewCb(self, window, unused):



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