r21079 by fschmid -

scribus-commit scribus-commit at lists.scribus.net
Sat Mar 12 10:03:06 UTC 2016


Author: fschmid
Date: Sat Mar 12 10:03:05 2016
New Revision: 21079

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21079
Log:
Fixed Bug #6253: Missing "save 5 last version of saved doc" option

Modified:
    trunk/Scribus/scribus/fileloader.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
    trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
    trunk/Scribus/scribus/prefsmanager.cpp
    trunk/Scribus/scribus/prefsstructs.h
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribus.h
    trunk/Scribus/scribus/scribusdoc.cpp
    trunk/Scribus/scribus/scribusdoc.h
    trunk/Scribus/scribus/scribuswin.cpp
    trunk/Scribus/scribus/scribuswin.h
    trunk/Scribus/scribus/ui/prefs_documentsetup.cpp
    trunk/Scribus/scribus/ui/prefs_documentsetupbase.ui

Modified: trunk/Scribus/scribus/fileloader.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21079&path=/trunk/Scribus/scribus/fileloader.cpp
==============================================================================
--- trunk/Scribus/scribus/fileloader.cpp	(original)
+++ trunk/Scribus/scribus/fileloader.cpp	Sat Mar 12 10:03:05 2016
@@ -235,6 +235,8 @@
 	currDoc->itemToolPrefs().polyUseFactor = m_prefsManager->appPrefs.itemToolPrefs.polyUseFactor;
 	currDoc->setAutoSave(m_prefsManager->appPrefs.docSetupPrefs.AutoSave);
 	currDoc->setAutoSaveTime(m_prefsManager->appPrefs.docSetupPrefs.AutoSaveTime);
+	currDoc->setAutoSaveCount(m_prefsManager->appPrefs.docSetupPrefs.AutoSaveCount);
+	currDoc->setAutoSaveKeep(m_prefsManager->appPrefs.docSetupPrefs.AutoSaveKeep);
 	m_ReplacedFonts = currDoc->AllFonts->getSubstitutions();
 	//dummyScFaces.clear();
 	bool ret = false;

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21079&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp	Sat Mar 12 10:03:05 2016
@@ -2083,6 +2083,8 @@
 
 	m_Doc->setAutoSave(attrs.valueAsBool("AutoSave", false));
 	m_Doc->setAutoSaveTime(attrs.valueAsInt("AutoSaveTime", 600000));
+	m_Doc->setAutoSaveKeep(attrs.valueAsBool("AutoSaveKeep", false));
+	m_Doc->setAutoSaveCount(attrs.valueAsInt("AutoSaveCount", 5));
 	double leftScratch;
 	// FIXME A typo in early 1.3cvs (MAR 05) means we must support loading of
 	// FIXME 'ScatchLeft' for a while too. This can be removed in a few months.

Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21079&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	(original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp	Sat Mar 12 10:03:05 2016
@@ -326,6 +326,8 @@
 	docu.writeAttribute("spiralFactor", m_Doc->itemToolPrefs().spiralFactor);
 	docu.writeAttribute("AutoSave", static_cast<int>(m_Doc->autoSave()));
 	docu.writeAttribute("AutoSaveTime", m_Doc->autoSaveTime());
+	docu.writeAttribute("AutoSaveCount", m_Doc->autoSaveCount());
+	docu.writeAttribute("AutoSaveKeep", static_cast<int>(m_Doc->autoSaveKeep()));
 	docu.writeAttribute("ScratchBottom", m_Doc->scratch()->bottom());
 	docu.writeAttribute("ScratchLeft", m_Doc->scratch()->left());
 	docu.writeAttribute("ScratchRight", m_Doc->scratch()->right());

Modified: trunk/Scribus/scribus/prefsmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21079&path=/trunk/Scribus/scribus/prefsmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/prefsmanager.cpp	(original)
+++ trunk/Scribus/scribus/prefsmanager.cpp	Sat Mar 12 10:03:05 2016
@@ -324,6 +324,8 @@
 	appPrefs.hyphPrefs.AutoCheck = false;
 	appPrefs.docSetupPrefs.AutoSave = true;
 	appPrefs.docSetupPrefs.AutoSaveTime = 600000;
+	appPrefs.docSetupPrefs.AutoSaveCount = 5;
+	appPrefs.docSetupPrefs.AutoSaveKeep = false;
 	appPrefs.docSetupPrefs.saveCompressed = false;
 	int dpi = qApp->desktop()->logicalDpiX();
 	if ((dpi < 60) || (dpi > 200))
@@ -1378,6 +1380,8 @@
 	deDocumentSetup.setAttribute("PagePositioning", appPrefs.docSetupPrefs.pagePositioning);
 	deDocumentSetup.setAttribute("AutoSave", static_cast<int>(appPrefs.docSetupPrefs.AutoSave));
 	deDocumentSetup.setAttribute("AutoSaveTime", appPrefs.docSetupPrefs.AutoSaveTime);
+	deDocumentSetup.setAttribute("AutoSaveCount", appPrefs.docSetupPrefs.AutoSaveCount);
+	deDocumentSetup.setAttribute("AutoSaveKeep", static_cast<int>(appPrefs.docSetupPrefs.AutoSaveKeep));
 	deDocumentSetup.setAttribute("SaveCompressed", static_cast<int>(appPrefs.docSetupPrefs.saveCompressed));
 	deDocumentSetup.setAttribute("BleedTop", ScCLocale::toQStringC(appPrefs.docSetupPrefs.bleeds.top()));
 	deDocumentSetup.setAttribute("BleedLeft", ScCLocale::toQStringC(appPrefs.docSetupPrefs.bleeds.left()));
@@ -1987,6 +1991,8 @@
 			appPrefs.docSetupPrefs.pagePositioning	= dc.attribute("PagePositioning", "0").toInt();
 			appPrefs.docSetupPrefs.AutoSave	  = static_cast<bool>(dc.attribute("AutoSave", "0").toInt());
 			appPrefs.docSetupPrefs.AutoSaveTime  = dc.attribute("AutoSaveTime", "600000").toInt();
+			appPrefs.docSetupPrefs.AutoSaveCount  = dc.attribute("AutoSaveCount", "5").toInt();
+			appPrefs.docSetupPrefs.AutoSaveKeep = static_cast<bool>(dc.attribute("AutoSaveKeep", "0").toInt());
 			appPrefs.docSetupPrefs.saveCompressed = static_cast<bool>(dc.attribute("SaveCompressed", "0").toInt());
 			appPrefs.docSetupPrefs.bleeds.setTop(ScCLocale::toDoubleC(dc.attribute("BleedTop"), 0.0));
 			appPrefs.docSetupPrefs.bleeds.setLeft(ScCLocale::toDoubleC(dc.attribute("BleedLeft"), 0.0));

Modified: trunk/Scribus/scribus/prefsstructs.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21079&path=/trunk/Scribus/scribus/prefsstructs.h
==============================================================================
--- trunk/Scribus/scribus/prefsstructs.h	(original)
+++ trunk/Scribus/scribus/prefsstructs.h	Sat Mar 12 10:03:05 2016
@@ -177,6 +177,8 @@
 	int docUnitIndex; //! The index of the default unit
 	bool AutoSave;
 	int AutoSaveTime;
+	int AutoSaveCount;
+	bool AutoSaveKeep;
 	bool saveCompressed;
 };
 

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21079&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Sat Mar 12 10:03:05 2016
@@ -2265,7 +2265,6 @@
 	}
 	if (requiresGUI)
 	{
-		connect(w, SIGNAL(autoSaved()), this, SLOT(slotAutoSaved()));
 		connect(ScCore->fileWatcher, SIGNAL(fileChanged(QString)), tempDoc, SLOT(updatePict(QString)));
 		connect(ScCore->fileWatcher, SIGNAL(fileDeleted(QString)), tempDoc, SLOT(removePict(QString)));
 		connect(ScCore->fileWatcher, SIGNAL(dirChanged(QString )), tempDoc, SLOT(updatePictDir(QString )));
@@ -3725,7 +3724,6 @@
 		view->zoom();
 		view->GotoPage(0);
 		connect(mdiArea, SIGNAL(subWindowActivated(QMdiSubWindow *)), this, SLOT(newActWin(QMdiSubWindow *)));
-		connect(w, SIGNAL(autoSaved()), this, SLOT(slotAutoSaved()));
 		connect(ScCore->fileWatcher, SIGNAL(fileChanged(QString )), doc, SLOT(updatePict(QString)));
 		connect(ScCore->fileWatcher, SIGNAL(fileDeleted(QString )), doc, SLOT(removePict(QString)));
 		connect(ScCore->fileWatcher, SIGNAL(dirChanged(QString )), doc, SLOT(updatePictDir(QString )));
@@ -4032,12 +4030,6 @@
 	}
 }
 
-void ScribusMainWindow::slotAutoSaved()
-{
-	if (ActWin == sender())
-		updateActiveWindowCaption(doc->DocName);
-}
-
 bool ScribusMainWindow::slotFileSave()
 {
 	bool ret = false;
@@ -4170,8 +4162,6 @@
 	slotSelect();
 	doc->autoSaveTimer->stop();
 	doc->disconnectDocSignals();
-	disconnect(doc, SIGNAL(saved(QString)));
-	disconnect(doc->WinHan, SIGNAL(autoSaved()));
 	disconnect(ScCore->fileWatcher, SIGNAL(fileChanged(QString )), doc, SLOT(updatePict(QString)));
 	disconnect(ScCore->fileWatcher, SIGNAL(fileDeleted(QString )), doc, SLOT(removePict(QString)));
 	disconnect(ScCore->fileWatcher, SIGNAL(dirChanged(QString )), doc, SLOT(updatePictDir(QString )));

Modified: trunk/Scribus/scribus/scribus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21079&path=/trunk/Scribus/scribus/scribus.h
==============================================================================
--- trunk/Scribus/scribus/scribus.h	(original)
+++ trunk/Scribus/scribus/scribus.h	Sat Mar 12 10:03:05 2016
@@ -345,7 +345,6 @@
 	 * @brief Do post loading functions
 	 */
 	bool postLoadDoc();
-	void slotAutoSaved();
 	/** \brief save a document */
 	bool slotFileSave();
 	/** \brief save a document under a different filename*/

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21079&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp	(original)
+++ trunk/Scribus/scribus/scribusdoc.cpp	Sat Mar 12 10:03:05 2016
@@ -754,6 +754,18 @@
 		delete m_serializer;
 	if (m_tserializer)
 		delete m_tserializer;
+	if (!m_docPrefsData.docSetupPrefs.AutoSaveKeep)
+	{
+		if (autoSaveFiles.count() != 0)
+		{
+			for (int a = 0; a < autoSaveFiles.count(); a++)
+			{
+				QFile f(autoSaveFiles[a]);
+				f.remove();
+			}
+			autoSaveFiles.clear();
+		}
+	}
 	ScCore->fileWatcher->start();
 }
 
@@ -9800,7 +9812,6 @@
 		{
 			connect(this, SIGNAL(docChanged()), m_ScMW, SLOT(slotDocCh()));
 			connect(this, SIGNAL(firstSelectedItemType(int)), m_ScMW, SLOT(HaveNewSel()));
-			connect(this, SIGNAL(saved(QString)), WinHan, SLOT(slotSaved(QString)));
 			connect(this->m_Selection, SIGNAL(selectionChanged()), m_ScMW, SLOT(HaveNewSel()));
 			connect(autoSaveTimer, SIGNAL(timeout()), this, SLOT(slotAutoSave()));
 		}
@@ -9815,7 +9826,6 @@
 		{
 			disconnect(this, SIGNAL(docChanged()), m_ScMW, SLOT(slotDocCh()));
 			disconnect(this, SIGNAL(firstSelectedItemType(int)), m_ScMW, SLOT(HaveNewSel()));
-			disconnect(this, SIGNAL(saved(QString)), WinHan, SLOT(slotSaved(QString)));
 			disconnect(this->m_Selection, SIGNAL(selectionChanged()), m_ScMW, SLOT(HaveNewSel()));
 			disconnect(autoSaveTimer, SIGNAL(timeout()), this, SLOT(slotAutoSave()));
 		}
@@ -16398,9 +16408,23 @@
 {
 	if (hasName && isModified())
 	{
-		FileLoader fl(DocName);
-		if (fl.saveFile(DocName+".autosave", this, 0))
-			emit saved(DocName);
+		autoSaveTimer->stop();
+		QFileInfo fi(DocName);
+		QDateTime dat = QDateTime::currentDateTime();
+		QString fileName = QDir::cleanPath(fi.path() + "/" + fi.baseName() + QString("_autosave_%1.sla").arg(dat.toString("dd_MM_yyyy_hh_mm")));
+		FileLoader fl(fileName);
+		if (fl.saveFile(fileName, this, 0))
+		{
+			if (autoSaveFiles.count() >= m_docPrefsData.docSetupPrefs.AutoSaveCount)
+			{
+				QFile f(autoSaveFiles.first());
+				f.remove();
+				autoSaveFiles.removeFirst();
+			}
+			autoSaveFiles.append(fileName);
+		}
+		if (m_docPrefsData.docSetupPrefs.AutoSave)
+			autoSaveTimer->start(m_docPrefsData.docSetupPrefs.AutoSaveTime);
 	}
 }
 

Modified: trunk/Scribus/scribus/scribusdoc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21079&path=/trunk/Scribus/scribus/scribusdoc.h
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.h	(original)
+++ trunk/Scribus/scribus/scribusdoc.h	Sat Mar 12 10:03:05 2016
@@ -159,9 +159,13 @@
 	void setHyphAutoCheck(bool b) { m_docPrefsData.hyphPrefs.AutoCheck=b; }
 	bool autoSave() const { return m_docPrefsData.docSetupPrefs.AutoSave; }
 	int autoSaveTime() const  { return m_docPrefsData.docSetupPrefs.AutoSaveTime; }
+	int autoSaveCount() const  { return m_docPrefsData.docSetupPrefs.AutoSaveCount; }
+	bool autoSaveKeep() const  { return m_docPrefsData.docSetupPrefs.AutoSaveKeep; }
 	bool autoSaveClockDisplay() const  { return m_docPrefsData.displayPrefs.showAutosaveClockOnCanvas; }
 	void setAutoSave(bool b) { m_docPrefsData.docSetupPrefs.AutoSave=b; }
 	void setAutoSaveTime(int i) { m_docPrefsData.docSetupPrefs.AutoSaveTime=i; }
+	void setAutoSaveCount(int i) { m_docPrefsData.docSetupPrefs.AutoSaveCount=i; }
+	void setAutoSaveKeep(bool i) { m_docPrefsData.docSetupPrefs.AutoSaveKeep=i; }
 	//FIXME (maybe) :non const, the loaders make a mess here
 	PDFOptions& pdfOptions() { return m_docPrefsData.pdfPrefs; }
 	ObjAttrVector& itemAttributes() { return m_docPrefsData.itemAttrPrefs.defaultItemAttributes; }
@@ -1332,6 +1336,7 @@
 	bool hasName;
 	bool isConverted;
 	QTimer * const autoSaveTimer;
+	QList<QString> autoSaveFiles;
 	QHash<QString,multiLine> MLineStyles;
 	QHash<QString, ScPattern> docPatterns;
 	QHash<QString, VGradient> docGradients;
@@ -1380,7 +1385,6 @@
 	 * @brief Let the document tell whatever is listening that it has changed
 	 */
 	void docChanged();
-	void saved(QString name);
 	void updateContents();
 	void updateContents(const QRect &r);
 	void refreshItem(PageItem *);

Modified: trunk/Scribus/scribus/scribuswin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21079&path=/trunk/Scribus/scribus/scribuswin.cpp
==============================================================================
--- trunk/Scribus/scribus/scribuswin.cpp	(original)
+++ trunk/Scribus/scribus/scribuswin.cpp	Sat Mar 12 10:03:05 2016
@@ -60,13 +60,6 @@
 	setStatusBar(0);
 }
 
-void ScribusWin::slotSaved(QString newName)
-{
-	setWindowTitle(QDir::toNativeSeparators(newName));
-	qApp->processEvents();
-	emit autoSaved(); //TODO: to update the main window title, do this from the doc?
-}
-
 void ScribusWin::closeEvent(QCloseEvent *ce)
 {
 	activateWindow();

Modified: trunk/Scribus/scribus/scribuswin.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21079&path=/trunk/Scribus/scribus/scribuswin.h
==============================================================================
--- trunk/Scribus/scribus/scribuswin.h	(original)
+++ trunk/Scribus/scribus/scribuswin.h	Sat Mar 12 10:03:05 2016
@@ -51,12 +51,6 @@
 	ScribusDoc* doc() const { return m_Doc;}
 	QMdiSubWindow* getSubWin() { return m_subWindow; }
 	void setSubWin(QMdiSubWindow *win) { m_subWindow = win; }
-	
-public slots:
-	void slotSaved(QString newName);
-
-signals:
-	void autoSaved();
 
 protected:
 	QMdiSubWindow *m_subWindow;

Modified: trunk/Scribus/scribus/ui/prefs_documentsetup.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21079&path=/trunk/Scribus/scribus/ui/prefs_documentsetup.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_documentsetup.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_documentsetup.cpp	Sat Mar 12 10:03:05 2016
@@ -114,11 +114,12 @@
 	pageSizeLinkToolButton->setToolTip( "<qt>" + tr( "Enable or disable more page sizes by jumping to Page Size preferences" ) + "</qt>" );
 	pageOrientationComboBox->setToolTip( "<qt>" + tr( "Default orientation of document pages" ) + "</qt>" );
 	pageUnitsComboBox->setToolTip( "<qt>" + tr( "Default unit of measurement for document editing" ) + "</qt>" );
-	autosaveCheckBox->setToolTip( "<qt>" + tr( "When enabled, Scribus saves a backup copy of your file with the .bak extension each time the time period elapses" ) + "</qt>" );
+	autosaveCheckBox->setToolTip( "<qt>" + tr( "When enabled, Scribus saves backup copys of your file each time the time period elapses" ) + "</qt>" );
 	autosaveIntervalSpinBox->setToolTip( "<qt>" + tr( "Time period between saving automatically" ) + "</qt>" );
 	undoLengthSpinBox->setToolTip( "<qt>" + tr("Set the length of the action history in steps. If set to 0 infinite amount of actions will be stored.") + "</qt>");
 	applySizesToAllPagesCheckBox->setToolTip( "<qt>" + tr( "Apply the page size changes to all existing pages in the document" ) + "</qt>" );
 	applyMarginsToAllPagesCheckBox->setToolTip( "<qt>" + tr( "Apply the page size changes to all existing master pages in the document" ) + "</qt>" );
+	autosaveCountSpinBox->setToolTip("<qt>" + tr("Keep this many files during the editing session. Backup files will be removed when you close the document.") + "</qt>");
 }
 
 void Prefs_DocumentSetup::restoreDefaults(struct ApplicationPrefs *prefsData)
@@ -180,6 +181,8 @@
 	saveCompressedCheckBox->setChecked(prefsData->docSetupPrefs.saveCompressed);
 	autosaveCheckBox->setChecked( prefsData->docSetupPrefs.AutoSave );
 	autosaveIntervalSpinBox->setValue(prefsData->docSetupPrefs.AutoSaveTime / 1000 / 60);
+	autosaveCountSpinBox->setValue(prefsData->docSetupPrefs.AutoSaveCount);
+	autosaveKeepCheckBox->setChecked(prefsData->docSetupPrefs.AutoSaveKeep);
 	undoCheckBox->setChecked(PrefsManager::instance()->prefsFile->getContext("undo")->getBool("enabled", true));
 	int undoLength = UndoManager::instance()->getHistoryLength();
 	if (undoLength == -1)
@@ -204,6 +207,8 @@
 	prefsData->docSetupPrefs.saveCompressed=saveCompressedCheckBox->isChecked();
 	prefsData->docSetupPrefs.AutoSave=autosaveCheckBox->isChecked();
 	prefsData->docSetupPrefs.AutoSaveTime = autosaveIntervalSpinBox->value() * 1000 * 60;
+	prefsData->docSetupPrefs.AutoSaveCount = autosaveCountSpinBox->value();
+	prefsData->docSetupPrefs.AutoSaveKeep = autosaveKeepCheckBox->isChecked();
 	bool undoActive=undoCheckBox->isChecked();
 	if (!undoActive)
 		UndoManager::instance()->clearStack();

Modified: trunk/Scribus/scribus/ui/prefs_documentsetupbase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21079&path=/trunk/Scribus/scribus/ui/prefs_documentsetupbase.ui
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_documentsetupbase.ui	(original)
+++ trunk/Scribus/scribus/ui/prefs_documentsetupbase.ui	Sat Mar 12 10:03:05 2016
@@ -13,7 +13,7 @@
   <property name="windowTitle">
    <string notr="true">Form</string>
   </property>
-  <layout class="QVBoxLayout" name="verticalLayout">
+  <layout class="QVBoxLayout" name="verticalLayout_2">
    <item>
     <widget class="QLabel" name="titleLabel">
      <property name="font">
@@ -305,8 +305,8 @@
            <rect>
             <x>0</x>
             <y>0</y>
-            <width>233</width>
-            <height>236</height>
+            <width>242</width>
+            <height>208</height>
            </rect>
           </property>
           <layout class="QVBoxLayout" name="verticalLayout_5">
@@ -479,7 +479,7 @@
       <attribute name="title">
        <string>Saving && Undo</string>
       </attribute>
-      <layout class="QVBoxLayout" name="verticalLayout_2">
+      <layout class="QVBoxLayout" name="verticalLayout">
        <item>
         <widget class="QCheckBox" name="saveCompressedCheckBox">
          <property name="text">
@@ -533,18 +533,39 @@
        <item>
         <layout class="QHBoxLayout" name="horizontalLayout">
          <item>
-          <widget class="QLabel" name="label">
-           <property name="text">
-            <string>Interval:</string>
-           </property>
-          </widget>
-         </item>
-         <item>
-          <widget class="QSpinBox" name="autosaveIntervalSpinBox">
-           <property name="suffix">
-            <string> min</string>
-           </property>
-          </widget>
+          <layout class="QFormLayout" name="formLayout_2">
+           <item row="0" column="0">
+            <widget class="QLabel" name="label">
+             <property name="text">
+              <string>Interval:</string>
+             </property>
+            </widget>
+           </item>
+           <item row="0" column="1">
+            <widget class="QSpinBox" name="autosaveIntervalSpinBox">
+             <property name="suffix">
+              <string> min</string>
+             </property>
+             <property name="minimum">
+              <number>1</number>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="0">
+            <widget class="QLabel" name="label_2">
+             <property name="text">
+              <string>Number of Files to keep:</string>
+             </property>
+            </widget>
+           </item>
+           <item row="1" column="1">
+            <widget class="QSpinBox" name="autosaveCountSpinBox">
+             <property name="minimum">
+              <number>1</number>
+             </property>
+            </widget>
+           </item>
+          </layout>
          </item>
          <item>
           <spacer name="horizontalSpacer_2">
@@ -560,6 +581,13 @@
           </spacer>
          </item>
         </layout>
+       </item>
+       <item>
+        <widget class="QCheckBox" name="autosaveKeepCheckBox">
+         <property name="text">
+          <string>Keep Backup Files after closing the Document</string>
+         </property>
+        </widget>
        </item>
        <item>
         <spacer name="verticalSpacer_7">




More information about the scribus-commit mailing list