[geany/geany] c9f68d: Fix cancelling Project Close when showing the unsaved changes dialog

Nick Treleaven git-noreply at geany.org
Wed Nov 21 13:34:35 UTC 2012


Branch:      refs/heads/master
Author:      Nick Treleaven <nick.treleaven at btinternet.com>
Committer:   Nick Treleaven <nick.treleaven at btinternet.com>
Date:        Wed, 21 Nov 2012 13:34:35 UTC
Commit:      c9f68df68334fd1fad10481bf06aea06b3125a24
             https://github.com/geany/geany/commit/c9f68df68334fd1fad10481bf06aea06b3125a24

Log Message:
-----------
Fix cancelling Project Close when showing the unsaved changes dialog


Modified Paths:
--------------
    src/project.c

Modified: src/project.c
15 files changed, 9 insertions(+), 6 deletions(-)
===================================================================
@@ -348,12 +348,18 @@ void project_close(gboolean open_default)
 
 	g_return_if_fail(app->project != NULL);
 
-	ui_set_statusbar(TRUE, _("Project \"%s\" closed."), app->project->name);
-
-	/* use write_config() to save project session files */
+	/* save project session files, etc */
 	if (!write_config(FALSE))
 		g_warning("Project file \"%s\" could not be written", app->project->file_name);
 
+	if (project_prefs.project_session)
+	{
+		/* close all existing tabs first */
+		if (!document_close_all())
+			return;
+	}
+	ui_set_statusbar(TRUE, _("Project \"%s\" closed."), app->project->name);
+
 	/* remove project filetypes build entries */
 	if (app->project->build_filetypes_list != NULL)
 	{
@@ -383,9 +389,6 @@ void project_close(gboolean open_default)
 
 	if (project_prefs.project_session)
 	{
-		/* close all existing tabs first */
-		document_close_all();
-
 		/* after closing all tabs let's open the tabs found in the default config */
 		if (open_default && cl_options.load_session)
 		{



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).


More information about the Commits mailing list