Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 19366 → Rev 19367

/trunk/Scribus/scribus/scribus.cpp
4675,28 → 4675,13
 
bool ScribusMainWindow::slotFileClose()
{
if (doc->symbolEditMode())
{
editSymbolEnd();
return true;
}
else if (doc->inlineEditMode())
{
editInlineEnd();
return true;
}
else if (doc->masterPageMode())
{
editMasterPagesEnd();
return true;
}
ScribusWin* tw = ActWin;
mdiArea->closeActiveSubWindow();
windowsMenuAboutToShow();
if (tw == ActWin)
return false;
else
return true;
windowsMenuAboutToShow();
}
 
bool ScribusMainWindow::DoFileClose()
4894,6 → 4879,16
mainWindowStatusLabel->setText( tr("Ready"));
}
 
void ScribusMainWindow::slotEndSpecialEdit()
{
if (doc->symbolEditMode())
editSymbolEnd();
else if (doc->inlineEditMode())
editInlineEnd();
else if (doc->masterPageMode())
editMasterPagesEnd();
}
 
bool ScribusMainWindow::doPrint(PrintOptions &options, QString& error)
{
bool printDone = false;
/trunk/Scribus/scribus/scribus.h
363,6 → 363,7
/** \brief print the actual file */
void slotFilePrint();
void slotReallyPrint();
void slotEndSpecialEdit();
/*!
\author Franz Schmid
\brief Generate and print PostScript from a doc
/trunk/Scribus/scribus/scribusview.cpp
229,7 → 229,7
endEditButton = new QPushButton(loadIcon("22/exit.png"), tr("End Edit"), this);
endEditButton->setGeometry(m_vhRulerHW + 1, height() - m_vhRulerHW - endEditButton->minimumSizeHint().height() - 1, endEditButton->minimumSizeHint().width(), endEditButton->minimumSizeHint().height());
endEditButton->setVisible(false);
connect(endEditButton, SIGNAL(clicked()), m_ScMW, SLOT(slotFileClose()));
connect(endEditButton, SIGNAL(clicked()), m_ScMW, SLOT(slotEndSpecialEdit()));
 
m_oldSnapToElem = Doc->SnapElement;
languageChange();
/trunk/Scribus/scribus/scribuswin.cpp
66,53 → 66,32
{
activateWindow();
m_MainWindow->newActWin(getSubWin());
if (m_Doc->symbolEditMode())
if (m_Doc->isModified() && (m_Doc->viewCount == 1))
{
m_MainWindow->editSymbolEnd();
ce->ignore();
return;
}
else if (m_Doc->inlineEditMode())
{
m_MainWindow->editInlineEnd();
ce->ignore();
return;
}
else if (m_Doc->masterPageMode())
{
m_MainWindow->editMasterPagesEnd();
ce->ignore();
return;
}
else
{
if (m_Doc->isModified() && (m_Doc->viewCount == 1))
int exit = QMessageBox::information(m_MainWindow, CommonStrings::trWarning, tr("Document:")+" "+
QDir::toNativeSeparators(m_Doc->DocName)+"\n"+
tr("has been changed since the last save."),
QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel,
QMessageBox::Cancel);
if (exit == QMessageBox::Cancel)
{
int exit = QMessageBox::information(m_MainWindow, CommonStrings::trWarning, tr("Document:")+" "+
QDir::toNativeSeparators(m_Doc->DocName)+"\n"+
tr("has been changed since the last save."),
QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel,
QMessageBox::Cancel);
if (exit == QMessageBox::Cancel)
ce->ignore();
return;
}
if (exit == QMessageBox::Save)
{
if (m_MainWindow->slotFileSave())
{
if (m_Doc == m_MainWindow->storyEditor->currentDocument())
m_MainWindow->storyEditor->close();
}
else
{
ce->ignore();
return;
}
if (exit == QMessageBox::Save)
{
if (m_MainWindow->slotFileSave())
{
if (m_Doc == m_MainWindow->storyEditor->currentDocument())
m_MainWindow->storyEditor->close();
}
else
{
ce->ignore();
return;
}
}
}
m_MainWindow->DoFileClose();
}
m_MainWindow->DoFileClose();
ce->accept();
}