[pitivi] mainwindow: Handle the "unsaved changes" dialog response on new project creation
- From: Jean-François Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] mainwindow: Handle the "unsaved changes" dialog response on new project creation
- Date: Fri, 6 Sep 2013 00:14:41 +0000 (UTC)
commit 539e49da43ab5763ca563d810c2aa9518a39f069
Author: Jean-François Fortin Tam <nekohayo gmail com>
Date: Thu Sep 5 00:11:51 2013 -0400
mainwindow: Handle the "unsaved changes" dialog response on new project creation
Don't show the "Project Settings" dialog if the user has not made a choice
regarding unsaved changes, as the new project has not actually been created.
pitivi/mainwindow.py | 4 ++--
pitivi/project.py | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/mainwindow.py b/pitivi/mainwindow.py
index 5dc6220..0549c01 100644
--- a/pitivi/mainwindow.py
+++ b/pitivi/mainwindow.py
@@ -664,8 +664,8 @@ class PitiviMainWindow(Gtk.Window, Loggable):
## Toolbar/Menu actions callback
def _newProjectMenuCb(self, unused_action):
- self.app.projectManager.newBlankProject()
- self.showProjectSettingsDialog()
+ if self.app.projectManager.newBlankProject() is not False:
+ self.showProjectSettingsDialog()
def _openProjectCb(self, unused_action):
self.openProject()
diff --git a/pitivi/project.py b/pitivi/project.py
index c485ad8..a4943e3 100644
--- a/pitivi/project.py
+++ b/pitivi/project.py
@@ -388,9 +388,9 @@ class ProjectManager(Signallable, Loggable):
def newBlankProject(self, emission=True):
""" start up a new blank project """
- # if there's a running project we must close it
+ # This will prompt users about unsaved changes (if any):
if self.current_project is not None and not self.closeRunningProject():
- return False
+ return False # The user has not made a decision, don't do anything
if emission:
self.emit("new-project-loading", None)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]