r21102 by fschmid -

scribus-commit scribus-commit at lists.scribus.net
Mon Mar 21 18:34:25 UTC 2016


Author: fschmid
Date: Mon Mar 21 18:34:25 2016
New Revision: 21102

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21102
Log:
Fixed Bug #13832: Automatic recovery should rename file that was autorecovered as "filename_(recovered)_DD_MM_YYYY_HH_MM"

Modified:
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/ui/recoverdialog.cpp

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21102&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Mon Mar 21 18:34:25 2016
@@ -2059,8 +2059,7 @@
 			for (int i = 0; i < dia->recoverFiles.count(); ++i)
 			{
 				loadDoc(dia->recoverFiles[i]);
-				QFileInfo fi(dia->recoverFiles[i]);
-				doc->setName(fi.absolutePath() + "/" + dia->recoverNames[i] + ".sla");
+				doc->setName(dia->recoverNames[i]);
 				doc->hasName = true;
 				updateActiveWindowCaption(doc->DocName);
 				outlinePalette->setDoc(doc);

Modified: trunk/Scribus/scribus/ui/recoverdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21102&path=/trunk/Scribus/scribus/ui/recoverdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/recoverdialog.cpp	(original)
+++ trunk/Scribus/scribus/ui/recoverdialog.cpp	Mon Mar 21 18:34:25 2016
@@ -68,7 +68,12 @@
 		if (((QCheckBox*)(filesList->cellWidget(a, 0)))->isChecked())
 		{
 			recoverFiles.append(m_files[a]);
-			recoverNames.append(filesList->item(a, 1)->text());
+			QString nName = m_files[a];
+			if (nName.contains("emergency"))
+				nName.replace("emergency", tr("(recovered)"));
+			if (nName.contains("autosave"))
+				nName.replace("autosave", tr("(recovered)"));
+			recoverNames.append(nName);
 		}
 	}
 	accept();




More information about the scribus-commit mailing list