r21120 by fschmid -

scribus-commit scribus-commit at lists.scribus.net
Sat Mar 26 09:36:30 UTC 2016


Author: fschmid
Date: Sat Mar 26 09:36:30 2016
New Revision: 21120

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21120
Log:
Part of #13841, Display the usual multi-tab open-or-create-file dialog when recovery is aborted.

Modified:
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribus.h
    trunk/Scribus/scribus/scribuscore.cpp

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21120&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Sat Mar 26 09:36:30 2016
@@ -2048,9 +2048,10 @@
 	return foundFiles.toList();
 }
 
-void ScribusMainWindow::recoverFile(QStringList foundFiles)
+bool ScribusMainWindow::recoverFile(QStringList foundFiles)
 {
 	appModeHelper->setStartupActionsEnabled(false);
+	bool ret = false;
 	RecoverDialog* dia = new RecoverDialog(this, foundFiles);
 	if (dia->exec())
 	{
@@ -2066,9 +2067,11 @@
 				if (outlinePalette->isVisible())
 					outlinePalette->BuildTree();
 			}
+			ret = true;
 		}
 	}
 	delete dia;
+	return ret;
 }
 
 void ScribusMainWindow::startUpDialog()

Modified: trunk/Scribus/scribus/scribus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21120&path=/trunk/Scribus/scribus/scribus.h
==============================================================================
--- trunk/Scribus/scribus/scribus.h	(original)
+++ trunk/Scribus/scribus/scribus.h	Sat Mar 26 09:36:30 2016
@@ -172,7 +172,7 @@
 	void updateLayerMenu();
 	void emergencySave();
 	QStringList findRecoverableFile();
-	void recoverFile(QStringList foundFiles);
+	bool recoverFile(QStringList foundFiles);
 
 	/**
 	 * @brief Returns true if an arrow key is pressed down.

Modified: trunk/Scribus/scribus/scribuscore.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21120&path=/trunk/Scribus/scribus/scribuscore.cpp
==============================================================================
--- trunk/Scribus/scribus/scribuscore.cpp	(original)
+++ trunk/Scribus/scribus/scribuscore.cpp	Sat Mar 26 09:36:30 2016
@@ -137,7 +137,11 @@
 		}
 		else if ((recoverFiles.count() > 0) && usingGUI())
 		{
-			scribus->recoverFile(recoverFiles);
+			if (!scribus->recoverFile(recoverFiles))
+			{
+				if (PrefsManager::instance()->appPrefs.uiPrefs.showStartupDialog)
+					scribus->startUpDialog();
+			}
 		}
 		else
 		{




More information about the scribus-commit mailing list