[pitivi] mainwindow: Don't try to use the project URI when it doesn't exist yet
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] mainwindow: Don't try to use the project URI when it doesn't exist yet
- Date: Sat, 15 Sep 2012 19:44:30 +0000 (UTC)
commit 79cc06f7326f43f8f616ac3a9ed226defcb94975
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date: Sat Sep 15 15:42:14 2012 -0400
mainwindow: Don't try to use the project URI when it doesn't exist yet
pitivi/mainwindow.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/mainwindow.py b/pitivi/mainwindow.py
index f8ebe7d..32d8b7e 100644
--- a/pitivi/mainwindow.py
+++ b/pitivi/mainwindow.py
@@ -1078,7 +1078,11 @@ class PitiviMainWindow(Gtk.Window, Loggable):
#FIXME GES port undo/redo
#self.app.timelineLogObserver.pipeline = self.app.current.pipeline
self.app.current.connect("settings-changed", self._settingsChangedCb)
- self.settings.lastProjectFolder = os.path.dirname(path_from_uri(self.app.current.uri))
+ # When creating a blank project, medialibrary will eventually trigger
+ # this _setProject method, but there's no project URI yet.
+ if self.app.current.uri:
+ folder_path = os.path.dirname(path_from_uri(self.app.current.uri))
+ self.settings.lastProjectFolder = folder_path
def _settingsChangedCb(self, project, unused_old, new):
# TODO: this method's signature should be changed:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]