[pitivi] mainwindow: Use existing SourceFactory when viewing a source.
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Subject: [pitivi] mainwindow: Use existing SourceFactory when viewing a source.
- Date: Tue, 12 May 2009 11:08:26 -0400 (EDT)
commit 6fdddcc2b5ac3b4f765dbc5447133af4158f66b1
Author: Edward Hervey <bilboed bilboed com>
Date: Tue May 12 16:44:22 2009 +0200
mainwindow: Use existing SourceFactory when viewing a source.
---
pitivi/ui/mainwindow.py | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/pitivi/ui/mainwindow.py b/pitivi/ui/mainwindow.py
index 8763518..17d03de 100644
--- a/pitivi/ui/mainwindow.py
+++ b/pitivi/ui/mainwindow.py
@@ -861,8 +861,13 @@ class PitiviMainWindow(gtk.Window, Loggable):
context.finish(False, False, ctime)
return
- from pitivi.factories.file import FileSourceFactory
- self._viewFactory(FileSourceFactory(uri))
+ # Use factory from our source list if we have the given uri
+ if uri in self.project.sources:
+ fact = self.project.sources[uri]
+ else:
+ from pitivi.factories.file import FileSourceFactory
+ fact = FileSourceFactory(uri)
+ self._viewFactory(fact)
context.finish(True, False, ctime)
def _viewFactory(self, factory):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]