r17926 by fschmid - Urge users to use "Save As..." if the loaded document is a converted file.
scribus-commit
scribus-commit at lists.scribus.net
Sat Dec 1 12:21:23 UTC 2012
Author: fschmid
Date: Sat Dec 1 12:21:23 2012
New Revision: 17926
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=17926
Log:
Urge users to use "Save As..." if the loaded document is a converted file.
Modified:
trunk/Scribus/scribus/collect4output.cpp
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/scribusdoc.h
Modified: trunk/Scribus/scribus/collect4output.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17926&path=/trunk/Scribus/scribus/collect4output.cpp
==============================================================================
--- trunk/Scribus/scribus/collect4output.cpp (original)
+++ trunk/Scribus/scribus/collect4output.cpp Sat Dec 1 12:21:23 2012
@@ -155,7 +155,7 @@
if (!fi.isDir() || !fi.isWritable())
return false;
- if (m_Doc->hasName)
+ if ((m_Doc->hasName) && (!m_Doc->isConverted))
{
QFileInfo fis(m_Doc->DocName);
newName += fis.fileName();
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17926&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Sat Dec 1 12:21:23 2012
@@ -2458,7 +2458,7 @@
scrActions["fileSave"]->setEnabled(false);
}
else
- scrActions["fileSave"]->setEnabled(true);
+ scrActions["fileSave"]->setEnabled(!doc->isConverted);
scrActions["fileOpen"]->setEnabled(false);
scrActions["fileRevert"]->setEnabled(false);
scrMenuMgr->setMenuEnabled("FileOpenRecent", false);
@@ -2480,7 +2480,7 @@
scrActions["fileNewFromTemplate"]->setEnabled(true);
scrActions["fileOpen"]->setEnabled(true);
scrActions["fileClose"]->setEnabled(true);
- scrActions["fileSave"]->setEnabled(true);
+ scrActions["fileSave"]->setEnabled(!doc->isConverted);
scrActions["fileRevert"]->setEnabled(false);
scrMenuMgr->setMenuEnabled("FileOpenRecent", true);
@@ -2521,7 +2521,7 @@
void ScribusMainWindow::HaveNewDoc()
{
scrActions["filePrint"]->setEnabled(true);
- scrActions["fileSave"]->setEnabled(true);
+ scrActions["fileSave"]->setEnabled(!doc->isConverted);
scrActions["fileClose"]->setEnabled(true);
// scrActions["fileDocSetup"]->setEnabled(true);
scrActions["fileDocSetup150"]->setEnabled(true);
@@ -4231,6 +4231,7 @@
doc->setName(FName+ tr("(converted)"));
QFileInfo fi(doc->DocName);
doc->setName(fi.fileName());
+ doc->isConverted = true;
}
else
doc->setName(FName);
@@ -4299,11 +4300,8 @@
}
view->reformPages(false);
doc->setLoading(false);
-/* if (fileLoader->FileType > FORMATID_NATIVEIMPORTEND)
- {
- doc->hasName = false;
- slotFileSaveAs();
- } */
+// if (fileLoader->fileType() > FORMATID_NATIVEIMPORTEND)
+// scrActions["fileSave"]->setEnabled(false);
delete fileLoader;
view->updatesOn(true);
w->setUpdatesEnabled(true);
@@ -4333,7 +4331,6 @@
doc->autoSaveTimer->start(doc->autoSaveTime());
connect(doc, SIGNAL(updateAutoSaveClock()), view->clockLabel, SLOT(resetTime()));
view->clockLabel->resetTime();
-// scrActions["fileSave"]->setEnabled(false);
doc->NrItems = bookmarkPalette->BView->NrItems;
doc->First = bookmarkPalette->BView->First;
doc->Last = bookmarkPalette->BView->Last;
@@ -4582,7 +4579,7 @@
void ScribusMainWindow::slotFileRevert()
{
- if ((doc->hasName) && (doc->isModified()) && (!doc->masterPageMode()))
+ if ((doc->hasName) && (doc->isModified()) && (!doc->masterPageMode()) && (!doc->isConverted))
{
ScribusWin* tw = ActWin;
int t = QMessageBox::warning(this, CommonStrings::trWarning, "<qt>" +
@@ -4613,7 +4610,7 @@
bool ScribusMainWindow::slotFileSave()
{
bool ret = false;
- if (doc->hasName)
+ if ((doc->hasName) && (!doc->isConverted))
{
//Scribus 1.3.x warning, remove at a later stage
if (doc->is12doc && !warningVersion(this))
@@ -8794,7 +8791,7 @@
scrActions["fileOpen"]->setEnabled(true);
scrActions["fileClose"]->setEnabled(true);
scrActions["fileClose"]->setToolTip( tr("Close"));
- scrActions["fileSave"]->setEnabled(true);
+ scrActions["fileSave"]->setEnabled(!doc->isConverted);
scrMenuMgr->setMenuEnabled("FileOpenRecent", true);
scrActions["fileRevert"]->setEnabled(true);
scrActions["fileDocSetup150"]->setEnabled(true);
@@ -8899,7 +8896,7 @@
scrActions["fileOpen"]->setEnabled(true);
scrActions["fileClose"]->setEnabled(true);
scrActions["fileClose"]->setToolTip( tr("Close"));
- scrActions["fileSave"]->setEnabled(true);
+ scrActions["fileSave"]->setEnabled(!doc->isConverted);
scrMenuMgr->setMenuEnabled("FileOpenRecent", true);
scrActions["fileRevert"]->setEnabled(true);
scrActions["fileDocSetup150"]->setEnabled(true);
@@ -9007,7 +9004,7 @@
scrActions["fileNewFromTemplate"]->setEnabled(true);
scrActions["fileOpen"]->setEnabled(true);
scrActions["fileClose"]->setEnabled(true);
- scrActions["fileSave"]->setEnabled(true);
+ scrActions["fileSave"]->setEnabled(!doc->isConverted);
scrMenuMgr->setMenuEnabled("FileOpenRecent", true);
scrActions["fileRevert"]->setEnabled(true);
// scrActions["fileDocSetup"]->setEnabled(true);
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17926&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Sat Dec 1 12:21:23 2012
@@ -255,6 +255,7 @@
BookMarks(),
OldBM(false),
hasName(false),
+ isConverted(false),
autoSaveTimer(new QTimer(this)),
MLineStyles(),
WinHan(0),
@@ -357,6 +358,7 @@
BookMarks(),
OldBM(false),
hasName(false),
+ isConverted(false),
autoSaveTimer(new QTimer(this)),
MLineStyles(),
WinHan(0),
@@ -4836,6 +4838,7 @@
setName(fileName);
setModified(false);
hasName = true;
+ isConverted = false;
}
return ret;
}
Modified: trunk/Scribus/scribus/scribusdoc.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=17926&path=/trunk/Scribus/scribus/scribusdoc.h
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.h (original)
+++ trunk/Scribus/scribus/scribusdoc.h Sat Dec 1 12:21:23 2012
@@ -1326,6 +1326,7 @@
QList<BookMa> BookMarks;
bool OldBM;
bool hasName;
+ bool isConverted;
QTimer * const autoSaveTimer;
QHash<QString,multiLine> MLineStyles;
QHash<QString, ScPattern> docPatterns;
More information about the scribus-commit
mailing list