r19930 by craig - Tidy up in ScribusWin. Remove duplicate SE close code as ScMW Do FileClose does it
scribus-commit
scribus-commit at lists.scribus.net
Mon Mar 16 20:55:31 UTC 2015
Author: craig
Date: Mon Mar 16 20:55:31 2015
New Revision: 19930
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19930
Log:
Tidy up in ScribusWin. Remove duplicate SE close code as ScMW Do FileClose does it
Modified:
trunk/Scribus/scribus/scribuswin.cpp
trunk/Scribus/scribus/scribuswin.h
trunk/Scribus/scribus/ui/checkDocument.cpp
Modified: trunk/Scribus/scribus/scribuswin.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19930&path=/trunk/Scribus/scribus/scribuswin.cpp
==============================================================================
--- trunk/Scribus/scribus/scribuswin.cpp (original)
+++ trunk/Scribus/scribus/scribuswin.cpp Mon Mar 16 20:55:31 2015
@@ -34,7 +34,12 @@
#include "ui/storyeditor.h"
#include "util_icon.h"
-ScribusWin::ScribusWin(QWidget* parent, ScribusDoc* doc) : QMainWindow(parent)
+ScribusWin::ScribusWin(QWidget* parent, ScribusDoc* doc) :
+ QMainWindow(parent),
+ m_subWindow(0),
+ m_ScMW(0),
+ m_View(0),
+ m_winIndex(0)
{
setWindowIcon(loadIcon("AppIcon2.png"));
setAttribute(Qt::WA_DeleteOnClose);
@@ -43,7 +48,7 @@
void ScribusWin::setMainWindow(ScribusMainWindow *mw)
{
- m_MainWindow=mw;
+ m_ScMW=mw;
}
void ScribusWin::setView(ScribusView* newView)
@@ -65,10 +70,10 @@
void ScribusWin::closeEvent(QCloseEvent *ce)
{
activateWindow();
- m_MainWindow->newActWin(getSubWin());
+ m_ScMW->newActWin(getSubWin());
if (m_Doc->isModified() && (m_Doc->viewCount == 1))
{
- int exit = ScMessageBox::information(m_MainWindow, CommonStrings::trWarning, tr("Document:")+" "+
+ int exit = ScMessageBox::information(m_ScMW, CommonStrings::trWarning, tr("Document:")+" "+
QDir::toNativeSeparators(m_Doc->DocName)+"\n"+
tr("has been changed since the last save."),
QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel,
@@ -81,18 +86,13 @@
}
if (exit == QMessageBox::Save)
{
- if (m_MainWindow->slotFileSave())
- {
- if (m_Doc == m_MainWindow->storyEditor->currentDocument())
- m_MainWindow->storyEditor->close();
- }
- else
+ if (!m_ScMW->slotFileSave())
{
ce->ignore();
return;
}
}
}
- m_MainWindow->DoFileClose();
+ m_ScMW->DoFileClose();
ce->accept();
}
Modified: trunk/Scribus/scribus/scribuswin.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19930&path=/trunk/Scribus/scribus/scribuswin.h
==============================================================================
--- trunk/Scribus/scribus/scribuswin.h (original)
+++ trunk/Scribus/scribus/scribuswin.h Mon Mar 16 20:55:31 2015
@@ -61,7 +61,7 @@
protected:
QMdiSubWindow *m_subWindow;
ScribusDoc *m_Doc;
- ScribusMainWindow *m_MainWindow;
+ ScribusMainWindow *m_ScMW;
ScribusView *m_View;
int m_winIndex;
Modified: trunk/Scribus/scribus/ui/checkDocument.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19930&path=/trunk/Scribus/scribus/ui/checkDocument.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/checkDocument.cpp (original)
+++ trunk/Scribus/scribus/ui/checkDocument.cpp Mon Mar 16 20:55:31 2015
@@ -130,7 +130,7 @@
warnMap.insert(PV_EMPTY_TEXT_FRAME, qMakePair(tr("Empty Text Frame"), tr("If you have created a text frame, there is the presumption that you planned to put text in it.")));
warnMap.insert(PV_FONT_NOT_EMBEDDED, qMakePair(tr("Imported document contains non-embedded fonts"), tr("When some imported document uses non-embedded fonts, then their rendering will be wrong, unless by chance you have them installed on their system, but that cannot be guaranteed in case you want to share the resulting document.")));
warnMap.insert(PV_HIGH_DPI, qMakePair(tr("Image resolution above %1 DPI,\ncurrently %2 x %3 DPI"), tr("This is a user definable setting serving as a caution for high resolution images, which may lead to unnecessarily large files.")));
- warnMap.insert(PV_IMAGE_FRAME_PART_FILLED, qMakePair(tr("Image dimension is smaller than its frame"), tr("mage doesnt fit the whole space you reserved for it. Maybe this is intended, or maybe this is caused by bad inner placement or scale. The result will either be a cropped image or white space around the image.")));
+ warnMap.insert(PV_IMAGE_FRAME_PART_FILLED, qMakePair(tr("Image dimension is smaller than its frame"), tr("The image does not fit the whole space you reserved for it. Maybe this is intended, or maybe this is caused by bad inner placement or scale. The result will either be a cropped image or white space around the image.")));
warnMap.insert(PV_IS_GIF, qMakePair(tr("Image is GIF"), tr("This warning alerts you that you are using a bitmap based graphic format that is typically not used for high resolution images (.gif is one of those). This may result in poor viewing quality (for example: when commercially printed, viewed on a high-resolution screens, etc...). If your PDF will be printed commercially, there are some printing systems that will have difficulty printing these types of images.")));
warnMap.insert(PV_LOW_DPI, qMakePair(tr("Image resolution below %1 DPI,\ncurrently %2 x %3 DPI"), tr("This is a user definable setting serving as a caution for low resolution images, which may lead to poor quality output.")));
warnMap.insert(PV_MISSING_GLYPH, qMakePair(tr("Glyphs missing"), tr("You have one or more characters which do not have a corresponding glyph in your chosen font.")));
More information about the scribus-commit
mailing list