r14754 by jghali - improvements to #8833 fix : - change ScriptRunning type from bool to int and use it as a counter - make ScriptRunning private and implement appropriate methods to increment/decrement counter

scribus-commit scribus-commit at lists.scribus.net
Wed Feb 17 23:11:43 CET 2010


Revision: 14754
Author: jghali
Date: 2010-02-17T22:05:59.712105Z
Commit message: improvements to #8833 fix :
- change ScriptRunning type from bool to int and use it as a counter
- make ScriptRunning private and implement appropriate methods to increment/decrement counter

Changeset: 
M  /trunk/Scribus/scribus/ui/propertiespalette.cpp
M  /trunk/Scribus/scribus/plugins/import/ps/importps.cpp
M  /trunk/Scribus/scribus/scribusdoc.cpp
M  /trunk/Scribus/scribus/plugins/import/cgm/importcgm.cpp
M  /trunk/Scribus/scribus/plugins/import/pct/importpct.cpp
M  /trunk/Scribus/scribus/ui/preferencesdialog.h
M  /trunk/Scribus/scribus/scribusview.cpp
M  /trunk/Scribus/scribus/ui/pagepalette.cpp
M  /trunk/Scribus/scribus/plugins/import/ai/importai.cpp
M  /trunk/Scribus/scribus/plugins/import/svg/svgplugin.cpp
M  /trunk/Scribus/scribus/plugins/import/wmf/wmfimport.cpp
M  /trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
M  /trunk/Scribus/scribus/plugins/import/xar/importxar.cpp
M  /trunk/Scribus/scribus/scribus.cpp
M  /trunk/Scribus/scribus/ui/outlinepalette.cpp
M  /trunk/Scribus/scribus/plugins/import/drw/importdrw.cpp
M  /trunk/Scribus/scribus/scribus.h
M  /trunk/Scribus/scribus/plugins/import/xfig/importxfig.cpp
M  /trunk/Scribus/scribus/plugins/import/wpg/importwpg.cpp
M  /trunk/Scribus/scribus/plugins/tools/transform/transformeffect.cpp
M  /trunk/Scribus/scribus/plugins/import/cvg/importcvg.cpp
M  /trunk/Scribus/scribus/plugins/import/oodraw/oodrawimp.cpp

Diffs:
Index: scribus/scribusdoc.cpp
===================================================================
--- scribus/scribusdoc.cpp	(revision 14753)
+++ scribus/scribusdoc.cpp	(revision 14754)
@@ -9989,7 +9989,7 @@
 	DoDrawing = false;
 	view()->updatesOn(false);
 	m_Selection->delaySignalsOn();
-	m_ScMW->ScriptRunning = true;
+	m_ScMW->setScriptRunning(true);
 	if (mdData.type==0) // Copy and offset or set a gap
 	{
 		double dH = mdData.copyShiftGapH / docUnitRatio;
@@ -10079,7 +10079,7 @@
 	DoDrawing = true;
 	m_Selection->delaySignalsOff();
 	view()->updatesOn(true);
-	m_ScMW->ScriptRunning = false;
+	m_ScMW->setScriptRunning(false);
 	//FIXME: stop using m_View
 	m_View->Deselect(true);
 	view()->DrawNew();
@@ -12042,3 +12042,4 @@
 
 
 
+
Index: scribus/scribusview.cpp
===================================================================
--- scribus/scribusview.cpp	(revision 14753)
+++ scribus/scribusview.cpp	(revision 14754)
@@ -467,7 +467,7 @@
 		m_oldCanvasWidth = newCanvasWidth;
 		m_oldCanvasHeight = newCanvasHeight;
 	}
-	if (!Doc->isLoading() && !m_ScMW->ScriptRunning)
+	if (!Doc->isLoading() && !m_ScMW->scriptIsRunning())
 	{
 // 		qDebug() << "ScribusView-changed(): changed region:" << re;
 		m_canvas->m_viewMode.forceRedraw = true;
@@ -893,7 +893,7 @@
 		e->acceptProposedAction();
 		//<<#3524
 		activateWindow();
-		if (!m_ScMW->ScriptRunning)
+		if (!m_ScMW->scriptIsRunning())
 			raise();
 		m_ScMW->newActWin(((ScribusWin*)(Doc->WinHan))->getSubWin());
 		updateContents();
@@ -2426,7 +2426,7 @@
 
 void ScribusView::setRulerPos(int x, int y)
 {
-	if (m_ScMW->ScriptRunning)
+	if (m_ScMW->scriptIsRunning())
 		return;
 	if (Doc->guidesSettings.rulerMode)
 	{
@@ -2501,7 +2501,7 @@
 void ScribusView::reformPages(bool moveObjects)
 {
 	Doc->reformPages(moveObjects);
-	if (!m_ScMW->ScriptRunning)
+	if (!m_ScMW->scriptIsRunning())
 		setContentsPos(qRound((Doc->currentPage()->xOffset()-10 - 0*Doc->minCanvasCoordinate.x()) * m_canvas->scale()), qRound((Doc->currentPage()->yOffset()-10 - 0*Doc->minCanvasCoordinate.y()) * m_canvas->scale()));
 	if (!Doc->isLoading())
 	{
@@ -2669,7 +2669,7 @@
 
 void ScribusView::setMenTxt(int Seite)
 {
-	if (m_ScMW->ScriptRunning)
+	if (m_ScMW->scriptIsRunning())
 		return;
 	disconnect(pageSelector, SIGNAL(GotoPage(int)), this, SLOT(GotoPa(int)));
 	pageSelector->setMaximum(Doc->masterPageMode() ? 1 : Doc->Pages->count());
@@ -2781,7 +2781,7 @@
 {
 // 	qDebug("ScribusView::DrawNew");
 // 	printBacktrace(24);
-	if (m_ScMW->ScriptRunning)
+	if (m_ScMW->scriptIsRunning())
 		return;
 	m_canvas->m_viewMode.forceRedraw = true;
 	m_canvas->resetRenderMode();
@@ -2795,7 +2795,7 @@
 
 void ScribusView::SetCCPo(double x, double y)
 {
-	if (m_ScMW->ScriptRunning)
+	if (m_ScMW->scriptIsRunning())
 		return;
 	QPoint nx = m_canvas->canvasToLocal(FPoint(x, y));
 	QSize viewsize = viewport()->size();
@@ -2805,7 +2805,7 @@
 
 void ScribusView::SetCPo(double x, double y)
 {
-	if (m_ScMW->ScriptRunning)
+	if (m_ScMW->scriptIsRunning())
 		return;
 	QPoint nx = m_canvas->canvasToLocal(FPoint(x, y));
 	setContentsPos(nx.x(), nx.y());
@@ -2870,7 +2870,7 @@
 void ScribusView::GotoPage(int Seite)
 {
 	Doc->setCurrentPage(Doc->Pages->at(Seite));
-	if (m_ScMW->ScriptRunning)
+	if (m_ScMW->scriptIsRunning())
 		return;
 	setMenTxt(Seite);
 	SetCPo(Doc->currentPage()->xOffset() - 10, Doc->currentPage()->yOffset() - 10);
Index: scribus/ui/preferencesdialog.h
===================================================================
--- scribus/ui/preferencesdialog.h	(revision 14753)
+++ scribus/ui/preferencesdialog.h	(revision 14754)
@@ -1,118 +1,118 @@
-/*
-For general Scribus (>=1.3.2) copyright and licensing information please refer
-to the COPYING file provided with the program. Following this notice may exist
-a copyright and/or license notice that predates the release of Scribus 1.3.2
-for which a new license (GPL+exception) is in place.
-*/
-#ifndef PREFERENCESDIALOG_H
-#define PREFERENCESDIALOG_H
-
-
-#include <QListWidgetItem>
-#include <QMap>
-#include <QStackedWidget>
-
-#include "scribusapi.h"
-#include "prefsstructs.h"
-#include "ui_preferencesdialogbase.h"
-
-#include "ui/prefs_colormanagement.h"
-#include "ui/prefs_userinterface.h"
-#include "ui/prefs_documentsetup.h"
-#include "ui/prefs_display.h"
-#include "ui/prefs_guides.h"
-#include "ui/prefs_externaltools.h"
-#include "ui/prefs_keyboardshortcuts.h"
-#include "ui/prefs_paths.h"
-#include "ui/prefs_printer.h"
-#include "ui/prefs_hyphenator.h"
-#include "ui/prefs_miscellaneous.h"
-#include "ui/prefs_plugins.h"
-#include "ui/prefs_preflightverifier.h"
-#include "ui/prefs_scrapbook.h"
-#include "ui/prefs_typography.h"
-#include "ui/prefs_itemtools.h"
-#include "ui/prefs_operatortools.h"
-#include "ui/prefs_fonts.h"
-#include "ui/prefs_tableofcontents.h"
-#include "ui/prefs_pdfexport.h"
-#include "ui/prefs_documentitemattributes.h"
-#include "ui/prefs_imagecache.h"
-
-class PrefsManager;
-class ScribusMainWindow;
-
-
-/*! \brief The Scribus Preferences Dialog
-*/
-class SCRIBUS_API PreferencesDialog : public QDialog, Ui::PreferencesDialog
-{
-	Q_OBJECT
-
-	public:
-		PreferencesDialog(QWidget* parent);
-		~PreferencesDialog();
-
-		virtual void changeEvent(QEvent *e);
-		ApplicationPrefs prefs() const { return localPrefs; }
-
-	public slots:
-		/// \brief Overridden to emit accepted(), which plugin panels use
-		virtual void accept();
-		void itemSelected(QListWidgetItem* ic);
-		void newItemSelected();
-		void restoreDefaults();
-		void setupGui();
-		void saveGuiToPrefs();
-
-	protected slots:
-		virtual void languageChange();
-		void applyButtonClicked();
-
-
-	protected:
-		int addItem(QString name, QPixmap icon, QWidget *tab);
-		void setupListWidget();
-		void arrangeIcons();
-		void initPreferenceValues();
-		/*! \brief Scans plugins for those that want to add a prefs widget and
-		hooks them up to the dialog. */
-		void addPlugins();
-
-		Prefs_ColorManagement *prefs_ColorManagement;
-		Prefs_UserInterface *prefs_UserInterface;
-		Prefs_DocumentSetup *prefs_DocumentSetup;
-		Prefs_Display *prefs_Display;
-		Prefs_ExternalTools *prefs_ExternalTools;
-		Prefs_Guides *prefs_Guides;
-		Prefs_KeyboardShortcuts *prefs_KeyboardShortcuts;
-		Prefs_Paths *prefs_Paths;
-		Prefs_Printer *prefs_Printer;
-		Prefs_Hyphenator *prefs_Hyphenator;
-		Prefs_Miscellaneous *prefs_Miscellaneous;
-		Prefs_Plugins *prefs_Plugins;
-		Prefs_PreflightVerifier *prefs_PreflightVerifier;
-		Prefs_Scrapbook *prefs_Scrapbook;
-		Prefs_Typography *prefs_Typography;
-		Prefs_ItemTools *prefs_ItemTools;
-		Prefs_OperatorTools *prefs_OperatorTools;
-		Prefs_Fonts *prefs_Fonts;
-		Prefs_TableOfContents *prefs_TableOfContents;
-		Prefs_PDFExport *prefs_PDFExport;
-		Prefs_DocumentItemAttributes *prefs_DocumentItemAttributes;
-		Prefs_ImageCache *prefs_ImageCache;
-
-		QMap<QListWidgetItem*, int> stackWidgetMap;
-		int counter;
-		double unitRatio;
-		int docUnitIndex;
-		ScribusMainWindow* mainWin;
-		PrefsManager* prefsManager;
-
-		ApplicationPrefs localPrefs;
-};
-
-#endif
-
-
-
+/*
+For general Scribus (>=1.3.2) copyright and licensing information please refer
+to the COPYING file provided with the program. Following this notice may exist
+a copyright and/or license notice that predates the release of Scribus 1.3.2
+for which a new license (GPL+exception) is in place.
+*/
+#ifndef PREFERENCESDIALOG_H
+#define PREFERENCESDIALOG_H
+
+
+#include <QListWidgetItem>
+#include <QMap>
+#include <QStackedWidget>
+
+#include "scribusapi.h"
+#include "prefsstructs.h"
+#include "ui_preferencesdialogbase.h"
+
+#include "ui/prefs_colormanagement.h"
+#include "ui/prefs_userinterface.h"
+#include "ui/prefs_documentsetup.h"
+#include "ui/prefs_display.h"
+#include "ui/prefs_guides.h"
+#include "ui/prefs_externaltools.h"
+#include "ui/prefs_keyboardshortcuts.h"
+#include "ui/prefs_paths.h"
+#include "ui/prefs_printer.h"
+#include "ui/prefs_hyphenator.h"
+#include "ui/prefs_miscellaneous.h"
+#include "ui/prefs_plugins.h"
+#include "ui/prefs_preflightverifier.h"
+#include "ui/prefs_scrapbook.h"
+#include "ui/prefs_typography.h"
+#include "ui/prefs_itemtools.h"
+#include "ui/prefs_operatortools.h"
+#include "ui/prefs_fonts.h"
+#include "ui/prefs_tableofcontents.h"
+#include "ui/prefs_pdfexport.h"
+#include "ui/prefs_documentitemattributes.h"
+#include "ui/prefs_imagecache.h"
+
+class PrefsManager;
+class ScribusMainWindow;
+
+
+/*! \brief The Scribus Preferences Dialog
+*/
+class SCRIBUS_API PreferencesDialog : public QDialog, Ui::PreferencesDialog
+{
+	Q_OBJECT
+
+	public:
+		PreferencesDialog(QWidget* parent);
+		~PreferencesDialog();
+
+		virtual void changeEvent(QEvent *e);
+		ApplicationPrefs prefs() const { return localPrefs; }
+
+	public slots:
+		/// \brief Overridden to emit accepted(), which plugin panels use
+		virtual void accept();
+		void itemSelected(QListWidgetItem* ic);
+		void newItemSelected();
+		void restoreDefaults();
+		void setupGui();
+		void saveGuiToPrefs();
+
+	protected slots:
+		virtual void languageChange();
+		void applyButtonClicked();
+
+
+	protected:
+		int addItem(QString name, QPixmap icon, QWidget *tab);
+		void setupListWidget();
+		void arrangeIcons();
+		void initPreferenceValues();
+		/*! \brief Scans plugins for those that want to add a prefs widget and
+		hooks them up to the dialog. */
+		void addPlugins();
+
+		Prefs_ColorManagement *prefs_ColorManagement;
+		Prefs_UserInterface *prefs_UserInterface;
+		Prefs_DocumentSetup *prefs_DocumentSetup;
+		Prefs_Display *prefs_Display;
+		Prefs_ExternalTools *prefs_ExternalTools;
+		Prefs_Guides *prefs_Guides;
+		Prefs_KeyboardShortcuts *prefs_KeyboardShortcuts;
+		Prefs_Paths *prefs_Paths;
+		Prefs_Printer *prefs_Printer;
+		Prefs_Hyphenator *prefs_Hyphenator;
+		Prefs_Miscellaneous *prefs_Miscellaneous;
+		Prefs_Plugins *prefs_Plugins;
+		Prefs_PreflightVerifier *prefs_PreflightVerifier;
+		Prefs_Scrapbook *prefs_Scrapbook;
+		Prefs_Typography *prefs_Typography;
+		Prefs_ItemTools *prefs_ItemTools;
+		Prefs_OperatorTools *prefs_OperatorTools;
+		Prefs_Fonts *prefs_Fonts;
+		Prefs_TableOfContents *prefs_TableOfContents;
+		Prefs_PDFExport *prefs_PDFExport;
+		Prefs_DocumentItemAttributes *prefs_DocumentItemAttributes;
+		Prefs_ImageCache *prefs_ImageCache;
+
+		QMap<QListWidgetItem*, int> stackWidgetMap;
+		int counter;
+		double unitRatio;
+		int docUnitIndex;
+		ScribusMainWindow* mainWin;
+		PrefsManager* prefsManager;
+
+		ApplicationPrefs localPrefs;
+};
+
+#endif
+
+
+
Index: scribus/ui/pagepalette.cpp
===================================================================
--- scribus/ui/pagepalette.cpp	(revision 14753)
+++ scribus/ui/pagepalette.cpp	(revision 14754)
@@ -712,7 +712,7 @@
 
 void PagePalette::rebuildMasters()
 {
-	if (m_scMW->ScriptRunning)
+	if (m_scMW->scriptIsRunning())
 		return;
 	masterPageList->clear();
 	if (currView == 0)
@@ -733,7 +733,7 @@
 
 void PagePalette::rebuildPages()
 {
-	if (m_scMW->ScriptRunning)
+	if (m_scMW->scriptIsRunning())
 		return;
 	QString str;
 	disconnect(pageLayout, SIGNAL(selectedLayout(int )), this, SLOT(handlePageLayout(int )));
@@ -861,7 +861,7 @@
 
 void PagePalette::setView(ScribusView *view)
 {
-	if (m_scMW->ScriptRunning)
+	if (m_scMW->scriptIsRunning())
 		return;
 	currView = view;
 }
@@ -939,3 +939,4 @@
 	return masterPageList->Thumb;
 }
 
+
Index: scribus/ui/propertiespalette.cpp
===================================================================
--- scribus/ui/propertiespalette.cpp	(revision 14753)
+++ scribus/ui/propertiespalette.cpp	(revision 14754)
@@ -1655,7 +1655,7 @@
 
 void PropertiesPalette::closeEvent(QCloseEvent *closeEvent)
 {
-	if (m_ScMW && !m_ScMW->ScriptRunning)
+	if (m_ScMW && !m_ScMW->scriptIsRunning())
 	{
 		if ((HaveDoc) && (HaveItem))
 		{
@@ -1696,7 +1696,7 @@
 
 void PropertiesPalette::SelTab(int t)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	// fix for #5991: Property Palette text input box focus stays even when on another tab
 	// Disable widgets in all pages except current one - PV
@@ -1883,7 +1883,7 @@
 
 void PropertiesPalette::setDoc(ScribusDoc *d)
 {
-	if(doc == d || (m_ScMW && m_ScMW->ScriptRunning))
+	if(doc == d || (m_ScMW && m_ScMW->scriptIsRunning()))
 		return;
 
 	disconnect(this->Tpal, SIGNAL(NewTrans(double)), 0, 0);
@@ -2047,7 +2047,7 @@
 
 void PropertiesPalette::setTextFlowMode(PageItem::TextFlowMode mode)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning || !HaveItem)
+	if (!m_ScMW || m_ScMW->scriptIsRunning() || !HaveItem)
 		return;
 	if (CurItem->isGroupControl)
 	{
@@ -2087,7 +2087,7 @@
 
 void PropertiesPalette::SetCurItem(PageItem *i)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	//CB We shouldnt really need to process this if our item is the same one
 	//maybe we do if the item has been changed by scripter.. but that should probably
@@ -2536,7 +2536,7 @@
 
 void PropertiesPalette::NewSel(int nr)
 {
-	if (!HaveDoc || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	int visID;
 	PageItem *i=0;
@@ -2847,7 +2847,7 @@
 
 void PropertiesPalette::setXY(double x, double y)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	disconnect(Xpos, SIGNAL(valueChanged(double)), this, SLOT(NewX()));
 	disconnect(Ypos, SIGNAL(valueChanged(double)), this, SLOT(NewY()));
@@ -2915,7 +2915,7 @@
 
 void PropertiesPalette::setBH(double x, double y)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool tmp = HaveItem;
 	HaveItem = false;
@@ -2942,7 +2942,7 @@
 
 void PropertiesPalette::setR(double r)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool tmp = HaveItem;
 	double rr = r;
@@ -2955,7 +2955,7 @@
 
 void PropertiesPalette::setRR(double r)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool tmp = HaveItem;
 	HaveItem = false;
@@ -2965,7 +2965,7 @@
 
 void PropertiesPalette::setCols(int r, double g)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool tmp = HaveItem;
 	HaveItem = false;
@@ -3016,7 +3016,7 @@
 
 void PropertiesPalette::setLsp(double r)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool tmp = HaveItem;
 	HaveItem = false;
@@ -3040,7 +3040,7 @@
 
 void PropertiesPalette::setTextToFrameDistances(double left, double top, double bottom, double right)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool tmp = HaveItem;
 	HaveItem = false;
@@ -3053,7 +3053,7 @@
 
 void PropertiesPalette::setFontFace(const QString& newFont)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool tmp = HaveItem;
 	HaveItem = false;
@@ -3066,7 +3066,7 @@
 
 void PropertiesPalette::setSize(double s)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool tmp = HaveItem;
 	HaveItem = false;
@@ -3076,7 +3076,7 @@
 
 void PropertiesPalette::setExtra(double e)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool tmp = HaveItem;
 	HaveItem = false;
@@ -3086,7 +3086,7 @@
 
 void PropertiesPalette::ChangeScaling()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if (FreeScale == sender())
 	{
@@ -3123,7 +3123,7 @@
 
 void PropertiesPalette::setScaleAndOffset(double scx, double scy, double x, double y)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool tmp = HaveItem;
 	HaveItem = false;
@@ -3167,7 +3167,7 @@
 
 void PropertiesPalette::setLineWidth(double s)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool tmp = HaveItem;
 	HaveItem = false;
@@ -3190,7 +3190,7 @@
 
 void PropertiesPalette::setLIvalue(Qt::PenStyle p, Qt::PenCapStyle pc, Qt::PenJoinStyle pj)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool tmp = HaveItem;
 	HaveItem = false;
@@ -3272,7 +3272,7 @@
 
 void PropertiesPalette::updateStyle(const ParagraphStyle& newCurrent)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool tmp = HaveItem;
 	HaveItem = false;
@@ -3301,7 +3301,7 @@
 
 void PropertiesPalette::setStil(int s)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	StrokeIcon->setEnabled(false);
 	TxStroke->setEnabled(false);
@@ -3317,7 +3317,7 @@
 
 void PropertiesPalette::setAli(int e)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool tmp = HaveItem;
 	HaveItem = false;
@@ -3329,7 +3329,7 @@
 
 void PropertiesPalette::setParStyle(const QString& name)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool tmp = HaveItem;
 	HaveItem = false;
@@ -3340,7 +3340,7 @@
 
 void PropertiesPalette::setCharStyle(const QString& name)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool tmp = HaveItem;
 	HaveItem = false;
@@ -3350,7 +3350,7 @@
 
 void PropertiesPalette::setOpticalMargins()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	int omt(ParagraphStyle::OM_None);
 //	if (optMarginCheckLeftProtruding->isChecked()) omt+=ParagraphStyle::OM_LeftProtruding;
@@ -3366,7 +3366,7 @@
 
 void PropertiesPalette::resetOpticalMargins()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	doc->itemSelection_resetOpticalMargins();
 }
@@ -3387,7 +3387,7 @@
 
 void PropertiesPalette::setMinWordTracking()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	ParagraphStyle newStyle;
 	newStyle.setMinWordTracking(minWordTrackingSpinBox->value() / 100.0);
@@ -3397,7 +3397,7 @@
 
 void PropertiesPalette::setNormWordTracking()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	ParagraphStyle newStyle;
 //	newStyle.setNormWordTracking(percent / 100.0);
@@ -3407,7 +3407,7 @@
 
 void PropertiesPalette::setMinGlyphExtension()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	ParagraphStyle newStyle;
 	newStyle.setMinGlyphExtension(minGlyphExtSpinBox->value() / 100.0);
@@ -3416,7 +3416,7 @@
 
 void PropertiesPalette::setMaxGlyphExtension()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	ParagraphStyle newStyle;
 	newStyle.setMaxGlyphExtension(maxGlyphExtSpinBox->value() / 100.0);
@@ -3426,7 +3426,7 @@
 
 void PropertiesPalette::setTScaleV(double e)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool tmp = HaveItem;
 	HaveItem = false;
@@ -3436,21 +3436,21 @@
 
 void PropertiesPalette::NewTScaleV()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	doc->itemSelection_SetScaleV(qRound(ChScaleV->value() * 10));
 }
 
 void PropertiesPalette::NewTBase()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	doc->itemSelection_SetBaselineOffset(qRound(ChBase->value() * 10));
 }
 
 void PropertiesPalette::setTScale(double e)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool tmp = HaveItem;
 	HaveItem = false;
@@ -3460,7 +3460,7 @@
 
 void PropertiesPalette::setTBase(double e)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool tmp = HaveItem;
 	HaveItem = false;
@@ -3470,14 +3470,14 @@
 
 void PropertiesPalette::NewTScale()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	doc->itemSelection_SetScaleH(qRound(ChScale->value() * 10));
 }
 
 void PropertiesPalette::NewX()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if ((HaveDoc) && (HaveItem))
 	{
@@ -3559,7 +3559,7 @@
 
 void PropertiesPalette::NewY()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 
 	double x,y,w,h, gx, gy, gh, gw, base;
@@ -3639,7 +3639,7 @@
 
 void PropertiesPalette::NewW()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	
 	double x,y,w,h, gx, gy, gh, gw;
@@ -3746,7 +3746,7 @@
 
 void PropertiesPalette::NewH()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if ((HaveDoc) && (HaveItem))
 	{
@@ -3855,7 +3855,7 @@
 
 void PropertiesPalette::setRotation()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	double gx, gy, gh, gw;
 	if ((HaveDoc) && (HaveItem))
@@ -3884,7 +3884,7 @@
 
 void PropertiesPalette::NewCornerRadius()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	CurItem->setCornerRadius(RoundRect->value() / m_unitRatio);
 	m_ScMW->view->SetFrameRounded();
@@ -3894,14 +3894,14 @@
 
 void PropertiesPalette::NewLineSpacing()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	doc->itemSelection_SetLineSpacing(LineSp->value());
 }
 
 void PropertiesPalette::HandleGapSwitch()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	setCols(CurItem->Cols, CurItem->ColGap);
 	dGap->setToolTip("");
@@ -3914,7 +3914,7 @@
 
 void PropertiesPalette::NewCols()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	CurItem->Cols = DCol->value();
 	setCols(CurItem->Cols, CurItem->ColGap);
@@ -3924,7 +3924,7 @@
 
 void PropertiesPalette::NewPage()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool reallynew = (CurItem->pixm.imgInfo.actualPageNumber != imagePageNumber->value());
 	CurItem->pixm.imgInfo.actualPageNumber = imagePageNumber->value();
@@ -3935,7 +3935,7 @@
 
 void PropertiesPalette::NewGap()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if (colgapLabel->currentIndex() == 0)
 		CurItem->ColGap = dGap->value() / m_unitRatio;
@@ -3956,28 +3956,28 @@
 
 void PropertiesPalette::NewSize()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	doc->itemSelection_SetFontSize(qRound(Size->value()*10.0));
 }
 
 void PropertiesPalette::NewTracking()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	doc->itemSelection_SetTracking(qRound(Extra->value() * 10.0));
 }
 
 void PropertiesPalette::NewLocalXY()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	doc->itemSelection_SetImageOffset(imageXOffsetSpinBox->value() / m_unitRatio / CurItem->imageXScale(), imageYOffsetSpinBox->value() / m_unitRatio / CurItem->imageYScale());
 }
 
 void PropertiesPalette::NewLocalSC()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if ((HaveDoc) && (HaveItem))
 	{
@@ -3997,7 +3997,7 @@
 
 void PropertiesPalette::NewLocalDpi()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if ((HaveDoc) && (HaveItem))
 	{
@@ -4018,14 +4018,14 @@
 
 void PropertiesPalette::handleImageEffects()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	m_ScMW->ImageEffects();
 }
 
 void PropertiesPalette::handleExtImgProperties()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	m_ScMW->view->editExtendedImageProperties();
 	emit DocChanged();
@@ -4033,7 +4033,7 @@
 
 void PropertiesPalette::NewLineWidth()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if ((HaveDoc) && (HaveItem))
 	{
@@ -4063,14 +4063,14 @@
 
 void PropertiesPalette::setStartArrow(int id)
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	doc->itemSelection_ApplyArrowHead(id,-1);
 }
 
 void PropertiesPalette::setEndArrow(int id)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if ((HaveDoc) && (HaveItem))
 		doc->itemSelection_ApplyArrowHead(-1, id);
@@ -4078,7 +4078,7 @@
 
 void PropertiesPalette::NewLineStyle()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if ((HaveDoc) && (HaveItem))
 	{
@@ -4115,7 +4115,7 @@
 
 void PropertiesPalette::dashChange()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if ((HaveDoc) && (HaveItem))
 	{
@@ -4131,7 +4131,7 @@
 
 void PropertiesPalette::NewLineMode()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if (LineMode->currentIndex() == 0)
 	{
@@ -4161,7 +4161,7 @@
 
 void PropertiesPalette::NewLineJoin()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	Qt::PenJoinStyle c = Qt::MiterJoin;
 	switch (LJoinStyle->currentIndex())
@@ -4182,7 +4182,7 @@
 
 void PropertiesPalette::NewLineEnd()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	Qt::PenCapStyle c = Qt::FlatCap;
 	switch (LEndStyle->currentIndex())
@@ -4203,7 +4203,7 @@
 
 void PropertiesPalette::ToggleKette()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	disconnect(imageXScaleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(HChange()));
 	disconnect(imageYScaleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(VChange()));
@@ -4243,7 +4243,7 @@
 
 void PropertiesPalette::ToggleKetteD()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	disconnect(imgDpiX, SIGNAL(valueChanged(double)), this, SLOT(HChangeD()));
 	disconnect(imgDpiY, SIGNAL(valueChanged(double)), this, SLOT(VChangeD()));
@@ -4283,14 +4283,14 @@
 
 void PropertiesPalette::NewAlignement(int a)
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	doc->itemSelection_SetAlignment(a);
 }
 
 void PropertiesPalette::setTypeStyle(int s)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	emit NewEffects(s);
 }
@@ -4307,7 +4307,7 @@
 
 void PropertiesPalette::setShadowOffs(double x, double y)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	disconnect(SeStyle->ShadowVal->Xoffset, SIGNAL(valueChanged(double)), this, SLOT(newShadowOffs()));
 	disconnect(SeStyle->ShadowVal->Yoffset, SIGNAL(valueChanged(double)), this, SLOT(newShadowOffs()));
@@ -4329,7 +4329,7 @@
 
 void PropertiesPalette::setUnderline(double p, double w)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	disconnect(SeStyle->UnderlineVal->LPos, SIGNAL(valueChanged(double)), this, SLOT(newUnderline()));
 	disconnect(SeStyle->UnderlineVal->LWidth, SIGNAL(valueChanged(double)), this, SLOT(newUnderline()));
@@ -4351,7 +4351,7 @@
 
 void PropertiesPalette::setStrike(double p, double w)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	disconnect(SeStyle->StrikeVal->LPos, SIGNAL(valueChanged(double)), this, SLOT(newStrike()));
 	disconnect(SeStyle->StrikeVal->LWidth, SIGNAL(valueChanged(double)), this, SLOT(newStrike()));
@@ -4363,7 +4363,7 @@
 
 void PropertiesPalette::setOutlineW(double x)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	disconnect(SeStyle->OutlineVal->LWidth, SIGNAL(valueChanged(double)), this, SLOT(newOutlineW()));
 	SeStyle->OutlineVal->LWidth->setValue(x / 10.0);
@@ -4379,35 +4379,35 @@
 
 void PropertiesPalette::DoLower()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	m_ScMW->view->LowerItem();
 }
 
 void PropertiesPalette::DoRaise()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	m_ScMW->view->RaiseItem();
 }
 
 void PropertiesPalette::DoFront()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	m_ScMW->view->ToFront();
 }
 
 void PropertiesPalette::DoBack()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	m_ScMW->view->ToBack();
 }
 
 void PropertiesPalette::NewRotMode(int m)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	double inX, inY, gx, gy, gh, gw;
 	inX = 0;
@@ -4516,7 +4516,7 @@
 void PropertiesPalette::DoFlow()
 {
 	PageItem::TextFlowMode mode = PageItem::TextFlowDisabled;
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if ((HaveDoc) && (HaveItem))
 	{
@@ -4554,7 +4554,7 @@
 
 void PropertiesPalette::MakeIrre(int f, int c, qreal *vals)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if ((HaveDoc) && (HaveItem))
 	{
@@ -4620,7 +4620,7 @@
 
 void PropertiesPalette::handleShapeEdit()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if ((HaveDoc) && (HaveItem))
 	{
@@ -4632,7 +4632,7 @@
 
 void PropertiesPalette::NewTDist()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if ((HaveDoc) && (HaveItem))
 	{
@@ -4645,7 +4645,7 @@
 
 void PropertiesPalette::NewSpGradient(double x1, double y1, double x2, double y2, double fx, double fy, double sg, double sk)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if ((HaveDoc) && (HaveItem))
 	{
@@ -4720,7 +4720,7 @@
 
 void PropertiesPalette::toggleGradientEdit(int stroke)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if ((HaveDoc) && (HaveItem))
 	{
@@ -4745,7 +4745,7 @@
 
 void PropertiesPalette::NewSpGradientM(double x1, double y1, double x2, double y2, double fx, double fy, double sg, double sk)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if ((HaveDoc) && (HaveItem))
 	{
@@ -4786,7 +4786,7 @@
 
 void PropertiesPalette::toggleGradientEditM()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if ((HaveDoc) && (HaveItem))
 	{
@@ -4800,14 +4800,14 @@
 
 void PropertiesPalette::NewTFont(QString c)
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	emit NewFont(c);
 }
 
 void PropertiesPalette::DoRevert()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool setter=Revert->isChecked();
 	CurItem->setImageFlippedH(setter);
@@ -4819,7 +4819,7 @@
 
 void PropertiesPalette::doClearCStyle()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if (HaveDoc)
 	{
@@ -4830,7 +4830,7 @@
 
 void PropertiesPalette::doClearPStyle()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if (HaveDoc)
 	{
@@ -4843,7 +4843,7 @@
 
 void PropertiesPalette::SetLineFormats(ScribusDoc *dd)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	disconnect(StyledLine, SIGNAL(itemClicked(QListWidgetItem*)), this, SLOT(SetSTline(QListWidgetItem*)));
 	StyledLine->clear();
@@ -4862,7 +4862,7 @@
 
 void PropertiesPalette::SetSTline(QListWidgetItem *c)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if (c == NULL)
 		return;
@@ -4876,7 +4876,7 @@
 
 void PropertiesPalette::updateColorList()
 {
-	if (!HaveDoc || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	Cpal->SetColors(doc->PageColors);
 	Cpal->SetPatterns(&doc->docPatterns);
@@ -4893,7 +4893,7 @@
 
 void PropertiesPalette::updateCmsList()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if (HaveDoc)
 	{
@@ -4960,35 +4960,35 @@
 
 void PropertiesPalette::ChangeProfile(const QString& prn)
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	doc->itemSelection_SetColorProfile(InputP->currentText());
 }
 
 void PropertiesPalette::ChangeIntent()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	doc->itemSelection_SetRenderIntent(MonitorI->currentIndex());
 }
  
 void PropertiesPalette::ChangeCompressionMethod()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	doc->itemSelection_SetCompressionMethod(CompressionMethod->currentIndex() - 1);
 }
 
 void PropertiesPalette::ChangeCompressionQuality()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	doc->itemSelection_SetCompressionQuality(CompressionQuality->currentIndex() - 1);
 }
 
 void PropertiesPalette::ShowCMS()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if (HaveItem)
 		updateCmsList();
@@ -4998,21 +4998,21 @@
 
 void PropertiesPalette::newTxtFill()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	doc->itemSelection_SetFillColor(TxFill->currentColor());
 }
 
 void PropertiesPalette::newTxtStroke()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	doc->itemSelection_SetStrokeColor(TxStroke->currentColor());
 }
 
 void PropertiesPalette::setActShade()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	int b;
 	if (PM1 == sender())
@@ -5029,7 +5029,7 @@
 
 void PropertiesPalette::setActFarben(QString p, QString b, double shp, double shb)
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	ColorList::Iterator it;
 	int c = 0;
@@ -5062,28 +5062,28 @@
 
 void PropertiesPalette::handleLock()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	m_ScMW->scrActions["itemLock"]->toggle();
 }
 
 void PropertiesPalette::handleLockSize()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	m_ScMW->scrActions["itemLockSize"]->toggle();
 }
 
 void PropertiesPalette::handlePrint()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	m_ScMW->scrActions["itemPrintingEnabled"]->toggle();
 }
 
 void PropertiesPalette::handleFlipH()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	m_ScMW->scrActions["itemFlipH"]->toggle();
 	/*
@@ -5100,7 +5100,7 @@
 
 void PropertiesPalette::handleFlipV()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	m_ScMW->scrActions["itemFlipV"]->toggle();
 	/*
@@ -5118,7 +5118,7 @@
 
 void PropertiesPalette::handlePathType()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	CurItem->textPathType = pathTextType->currentIndex();
 	CurItem->update();
@@ -5127,7 +5127,7 @@
 
 void PropertiesPalette::handlePathFlip()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	CurItem->textPathFlipped = flippedPathText->isChecked();
 	CurItem->updatePolyClip();
@@ -5137,7 +5137,7 @@
 
 void PropertiesPalette::handlePathLine()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	CurItem->PoShow = showcurveCheckBox->isChecked();
 	CurItem->update();
@@ -5146,7 +5146,7 @@
 
 void PropertiesPalette::handlePathDist()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	CurItem->setTextToFrameDistLeft(Dist->value());
 	doc->AdjustItemSize(CurItem);
@@ -5157,7 +5157,7 @@
 
 void PropertiesPalette::handlePathOffs()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	CurItem->BaseOffs = -LineW->value();
 	doc->AdjustItemSize(CurItem);
@@ -5168,7 +5168,7 @@
 
 void PropertiesPalette::handleFillRule()
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	CurItem->fillRule = EvenOdd->isChecked();
 	CurItem->update();
@@ -5177,7 +5177,7 @@
 
 void PropertiesPalette::handleOverprint(int val)
 {
-	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->ScriptRunning)
+	if (!HaveDoc || !HaveItem || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	bool setter = true;
 	if (val == 0)
@@ -5187,7 +5187,7 @@
 
 void PropertiesPalette::NewName()
 {
-	if (m_ScMW->ScriptRunning || !HaveDoc || !HaveItem)
+	if (m_ScMW->scriptIsRunning() || !HaveDoc || !HaveItem)
 		return;
 	QString NameOld = CurItem->itemName();
 	QString NameNew = NameEdit->text();
@@ -5226,7 +5226,7 @@
 {
 	QStringList sortList;
 	QMap<QString,QString>::Iterator it;
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	langCombo->clear();
 	for (it = langMap.begin(); it != langMap.end(); ++it)
@@ -5882,7 +5882,7 @@
 
 void PropertiesPalette::handleShapeEdit2()
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning)
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 	if ((HaveDoc) && (HaveItem))
 	{
@@ -5912,7 +5912,7 @@
 
 void PropertiesPalette::flop(int radioFlop)
 {
-	if (!m_ScMW || m_ScMW->ScriptRunning || !HaveDoc || !HaveItem)
+	if (!m_ScMW || m_ScMW->scriptIsRunning() || !HaveDoc || !HaveItem)
 		return;
 // 	qDebug("%s", QString("rF %1").arg(radioFlop).toAscii());
 	if( radioFlop == 0)
@@ -5926,3 +5926,4 @@
 }
 
 
+
Index: scribus/ui/outlinepalette.cpp
===================================================================
--- scribus/ui/outlinepalette.cpp	(revision 14753)
+++ scribus/ui/outlinepalette.cpp	(revision 14754)
@@ -242,7 +242,7 @@
 
 void OutlinePalette::slotRightClick(QPoint point)
 {
-	if (!m_MainWindow || m_MainWindow->ScriptRunning)
+	if (!m_MainWindow || m_MainWindow->scriptIsRunning())
 		return;
 	QTreeWidgetItem *ite = reportDisplay->itemAt(point);
 	if (ite == NULL)
@@ -276,7 +276,7 @@
 
 void OutlinePalette::slotDoRename(QTreeWidgetItem *ite , int col)
 {
-	if (!m_MainWindow || m_MainWindow->ScriptRunning)
+	if (!m_MainWindow || m_MainWindow->scriptIsRunning())
 		return;
 	disconnect(reportDisplay, SIGNAL(itemChanged(QTreeWidgetItem*, int)), this, SLOT(slotDoRename(QTreeWidgetItem*, int)));
 	OutlineTreeItem *item = (OutlineTreeItem*)ite;
@@ -392,7 +392,7 @@
 
 void OutlinePalette::slotShowSelect(uint SNr, int Nr)
 {
-	if (!m_MainWindow || m_MainWindow->ScriptRunning)
+	if (!m_MainWindow || m_MainWindow->scriptIsRunning())
 		return;
 	if (currDoc==NULL)
 		return;
@@ -489,7 +489,7 @@
 
 void OutlinePalette::reopenTree()
 {
-	if (!m_MainWindow || m_MainWindow->ScriptRunning)
+	if (!m_MainWindow || m_MainWindow->scriptIsRunning())
 		return;
 	if (currDoc->OpenNodes.count() == 0)
 		return;
@@ -544,7 +544,7 @@
 
 void OutlinePalette::slotMultiSelect()
 {
-	if (!m_MainWindow || m_MainWindow->ScriptRunning)
+	if (!m_MainWindow || m_MainWindow->scriptIsRunning())
 		return;
 	if (currDoc==NULL)
 		return;
@@ -597,7 +597,7 @@
 
 void OutlinePalette::slotSelect(QTreeWidgetItem* ite, int col)
 {
-	if (!m_MainWindow || m_MainWindow->ScriptRunning)
+	if (!m_MainWindow || m_MainWindow->scriptIsRunning())
 		return;
 	selectionTriggered = true;
 	OutlineTreeItem *item = (OutlineTreeItem*)ite;
@@ -653,7 +653,7 @@
 */
 void OutlinePalette::BuildTree(bool storeVals)
 {
-	if (!m_MainWindow || m_MainWindow->ScriptRunning)
+	if (!m_MainWindow || m_MainWindow->scriptIsRunning())
 		return;
 	if (currDoc==NULL)
 		return;
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp	(revision 14753)
+++ scribus/scribus.cpp	(revision 14754)
@@ -437,7 +437,7 @@
 void ScribusMainWindow::initDefaultValues()
 {
 	HaveDoc = false;
-	ScriptRunning = false;
+	ScriptRunning = 0;
 	view = NULL;
 	doc = NULL;
 	DocNr = 1;
@@ -3733,7 +3733,7 @@
 		view->updatesOn(false);
 		doc->SoftProofing = false;
 		doc->Gamut = false;
-		ScriptRunning = true;
+		setScriptRunning(true);
 		bool loadSuccess=fileLoader->LoadFile(doc);
 		//Do the font replacement check from here, when we have a GUI. TODO do this also somehow without the GUI
 		//This also gives the user the opportunity to cancel the load when finding theres a replacement required.
@@ -3748,7 +3748,7 @@
 			delete w;
 			view=NULL;
 			doc=NULL;
-			ScriptRunning = false;
+			setScriptRunning(false);
 			qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 			mainWindowStatusLabel->setText("");
 			mainWindowProgressBar->reset();
@@ -3762,7 +3762,7 @@
 		fileLoader->informReplacementFonts();
 		setCurrentComboItem(view->unitSwitcher, unitGetStrFromIndex(doc->unitIndex()));
 		view->unitChange();
-		ScriptRunning = false;
+		setScriptRunning(false);
 		view->Deselect(true);
 		mainWindowStatusLabel->setText("");
 		mainWindowProgressBar->reset();
@@ -6467,7 +6467,7 @@
 void ScribusMainWindow::setMainWindowActive()
 {
 	activateWindow();
-	if (!ScriptRunning)
+	if (!scriptIsRunning())
 		raise();
 }
 
@@ -7603,7 +7603,7 @@
 // 	pdfToolBar->initVisibility();
 
 	activateWindow();
-	if (!ScriptRunning)
+	if (!scriptIsRunning())
 		raise();
 }
 
Index: scribus/plugins/scriptplugin/scriptercore.cpp
===================================================================
--- scribus/plugins/scriptplugin/scriptercore.cpp	(revision 14753)
+++ scribus/plugins/scriptplugin/scriptercore.cpp	(revision 14754)
@@ -267,7 +267,7 @@
 	{
 		ScCore->primaryMainWindow()->propertiesPalette->unsetDoc();
 		ScCore->primaryMainWindow()->pagePalette->setView(NULL);
-		ScCore->primaryMainWindow()->ScriptRunning = true;
+		ScCore->primaryMainWindow()->setScriptRunning(true);
 		qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 		// Create the sub-interpreter
 		// FIXME: This calls abort() in a Python debug build. We're doing something wrong.
@@ -372,15 +372,15 @@
 		Py_EndInterpreter(state);
 		PyEval_RestoreThread(stateo);
 //		qApp->restoreOverrideCursor();
-	}
-	ScCore->primaryMainWindow()->ScriptRunning = false;
+		ScCore->primaryMainWindow()->setScriptRunning(false);
+	}	
 }
 
 void ScripterCore::slotRunScript(const QString Script)
 {
 	ScCore->primaryMainWindow()->propertiesPalette->unsetDoc();
 	ScCore->primaryMainWindow()->pagePalette->setView(NULL);
-	ScCore->primaryMainWindow()->ScriptRunning = true;
+	ScCore->primaryMainWindow()->setScriptRunning(true);
 	inValue = Script;
 	QString cm;
 	cm = "# -*- coding: utf8 -*- \n";
@@ -443,7 +443,7 @@
 		// Because 'result' may be NULL, not a PyObject*, we must call PyXDECREF not Py_DECREF
 			Py_XDECREF(result);
 	}
-	ScCore->primaryMainWindow()->ScriptRunning = false;
+	ScCore->primaryMainWindow()->setScriptRunning(false);
 }
 
 void ScripterCore::slotInteractiveScript(bool visible)
Index: scribus/plugins/tools/transform/transformeffect.cpp
===================================================================
--- scribus/plugins/tools/transform/transformeffect.cpp	(revision 14753)
+++ scribus/plugins/tools/transform/transformeffect.cpp	(revision 14754)
@@ -178,7 +178,7 @@
 				currDoc->DoDrawing = false;
 				currDoc->view()->updatesOn(false);
 				currDoc->m_Selection->delaySignalsOn();
-				currDoc->scMW()->ScriptRunning = true;
+				currDoc->scMW()->setScriptRunning(true);
 				QTransform comulatedMatrix = matrix;
 				PageItem *currItem = currDoc->m_Selection->itemAt(0);
 				Elements.append(currItem);
@@ -255,7 +255,7 @@
 				currDoc->DoDrawing = true;
 				currDoc->m_Selection->delaySignalsOff();
 				currDoc->view()->updatesOn(true);
-				currDoc->scMW()->ScriptRunning = false;
+				currDoc->scMW()->setScriptRunning(false);
 				currDoc->m_Selection->connectItemToGUI();
 			}
 			qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
Index: scribus/plugins/import/cvg/importcvg.cpp
===================================================================
--- scribus/plugins/import/cvg/importcvg.cpp	(revision 14753)
+++ scribus/plugins/import/cvg/importcvg.cpp	(revision 14754)
@@ -79,8 +79,7 @@
 	Elements.clear();
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
-	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
-	m_Doc->scMW()->ScriptRunning = true;
+	m_Doc->scMW()->setScriptRunning(true);
 	QString CurDirP = QDir::currentPath();
 	QDir::setCurrent(fi.path());
 	if (convert(fName))
@@ -165,7 +164,7 @@
 			tmpImage.setText("XSize", QString("%1").arg(xs));
 			tmpImage.setText("YSize", QString("%1").arg(ys));
 		}
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->setLoading(false);
 		m_Doc->m_Selection->delaySignalsOff();
 		delete m_Doc;
@@ -175,7 +174,7 @@
 	{
 		QDir::setCurrent(CurDirP);
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		delete m_Doc;
 	}
 	return QImage();
@@ -277,8 +276,7 @@
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
 	m_Doc->view()->updatesOn(false);
-	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
-	m_Doc->scMW()->ScriptRunning = true;
+	m_Doc->scMW()->setScriptRunning(true);
 	qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 	QString CurDirP = QDir::currentPath();
 	QDir::setCurrent(fi.path());
@@ -347,7 +345,7 @@
 			}
 		}
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->setLoading(false);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 		if ((Elements.count() > 0) && (!ret) && (interactive))
@@ -407,7 +405,7 @@
 	{
 		QDir::setCurrent(CurDirP);
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->view()->updatesOn(true);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 	}
Index: scribus/plugins/import/svg/svgplugin.cpp
===================================================================
--- scribus/plugins/import/svg/svgplugin.cpp	(revision 14753)
+++ scribus/plugins/import/svg/svgplugin.cpp	(revision 14754)
@@ -258,8 +258,7 @@
 	m_Doc->setGUI(false, ScCore->primaryMainWindow(), 0);
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
-	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
-	m_Doc->scMW()->ScriptRunning = true;
+	m_Doc->scMW()->setScriptRunning(true);
 	gc->FontFamily = m_Doc->itemToolPrefs.textFont;
 	if (!m_Doc->PageColors.contains("Black"))
 		m_Doc->PageColors.insert("Black", ScColor(0, 0, 0, 255));
@@ -367,7 +366,7 @@
 		tmpImage.setText("YSize", QString("%1").arg(ys));
 		m_Doc->m_Selection->delaySignalsOff();
 	}
-	m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+	m_Doc->scMW()->setScriptRunning(false);
 	m_Doc->setLoading(false);
 	delete m_Doc;
 	QDir::setCurrent(CurDirP);
@@ -460,8 +459,7 @@
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
 	m_Doc->view()->updatesOn(false);
-	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
-	m_Doc->scMW()->ScriptRunning = true;
+	m_Doc->scMW()->setScriptRunning(true);
 	qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 	gc->FontFamily = m_Doc->itemToolPrefs.textFont;
 	if (!m_Doc->PageColors.contains("Black"))
@@ -591,7 +589,7 @@
 		}
 	}
 	m_Doc->DoDrawing = true;
-	m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+	m_Doc->scMW()->setScriptRunning(false);
 	if (interactive)
 		m_Doc->setLoading(false);
 	qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
Index: scribus/plugins/import/ps/importps.cpp
===================================================================
--- scribus/plugins/import/ps/importps.cpp	(revision 14753)
+++ scribus/plugins/import/ps/importps.cpp	(revision 14754)
@@ -218,8 +218,7 @@
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
 	m_Doc->view()->updatesOn(false);
-	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
-	m_Doc->scMW()->ScriptRunning = true;
+	m_Doc->scMW()->setScriptRunning(true);
 	qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 	QString CurDirP = QDir::currentPath();
 	QDir::setCurrent(fi.path());
@@ -290,7 +289,7 @@
 			}
 		}
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->setLoading(false);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 		if ((Elements.count() > 0) && (!ret) && (interactive))
@@ -355,7 +354,7 @@
 	{
 		QDir::setCurrent(CurDirP);
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->view()->updatesOn(true);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 	}
Index: scribus/plugins/import/cgm/importcgm.cpp
===================================================================
--- scribus/plugins/import/cgm/importcgm.cpp	(revision 14753)
+++ scribus/plugins/import/cgm/importcgm.cpp	(revision 14754)
@@ -83,8 +83,7 @@
 	Elements.clear();
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
-	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
-	m_Doc->scMW()->ScriptRunning = true;
+	m_Doc->scMW()->setScriptRunning(true);
 	QString CurDirP = QDir::currentPath();
 	QDir::setCurrent(fi.path());
 	if (convert(fName))
@@ -169,7 +168,7 @@
 			tmpImage.setText("XSize", QString("%1").arg(xs));
 			tmpImage.setText("YSize", QString("%1").arg(ys));
 		}
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->setLoading(false);
 		m_Doc->m_Selection->delaySignalsOff();
 		delete m_Doc;
@@ -179,7 +178,7 @@
 	{
 		QDir::setCurrent(CurDirP);
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		delete m_Doc;
 	}
 	return QImage();
@@ -278,8 +277,7 @@
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
 	m_Doc->view()->updatesOn(false);
-	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
-	m_Doc->scMW()->ScriptRunning = true;
+	m_Doc->scMW()->setScriptRunning(true);
 	qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 	QString CurDirP = QDir::currentPath();
 	QDir::setCurrent(fi.path());
@@ -348,7 +346,7 @@
 			}
 		}
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->setLoading(false);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 		if ((Elements.count() > 0) && (!ret) && (interactive))
@@ -408,7 +406,7 @@
 	{
 		QDir::setCurrent(CurDirP);
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->view()->updatesOn(true);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 	}
Index: scribus/plugins/import/pct/importpct.cpp
===================================================================
--- scribus/plugins/import/pct/importpct.cpp	(revision 14753)
+++ scribus/plugins/import/pct/importpct.cpp	(revision 14754)
@@ -82,8 +82,7 @@
 	Elements.clear();
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
-	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
-	m_Doc->scMW()->ScriptRunning = true;
+	m_Doc->scMW()->setScriptRunning(true);
 	QString CurDirP = QDir::currentPath();
 	QDir::setCurrent(fi.path());
 	if (convert(fName))
@@ -168,7 +167,7 @@
 			tmpImage.setText("XSize", QString("%1").arg(xs));
 			tmpImage.setText("YSize", QString("%1").arg(ys));
 		}
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->setLoading(false);
 		m_Doc->m_Selection->delaySignalsOff();
 		delete m_Doc;
@@ -178,7 +177,7 @@
 	{
 		QDir::setCurrent(CurDirP);
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		delete m_Doc;
 	}
 	return QImage();
@@ -278,8 +277,7 @@
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
 	m_Doc->view()->updatesOn(false);
-	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
-	m_Doc->scMW()->ScriptRunning = true;
+	m_Doc->scMW()->setScriptRunning(true);
 	qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 	QString CurDirP = QDir::currentPath();
 	QDir::setCurrent(fi.path());
@@ -348,7 +346,7 @@
 			}
 		}
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->setLoading(false);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 		if ((Elements.count() > 0) && (!ret) && (interactive))
@@ -422,7 +420,7 @@
 	{
 		QDir::setCurrent(CurDirP);
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->view()->updatesOn(true);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 	}
Index: scribus/plugins/import/ai/importai.cpp
===================================================================
--- scribus/plugins/import/ai/importai.cpp	(revision 14753)
+++ scribus/plugins/import/ai/importai.cpp	(revision 14754)
@@ -161,8 +161,7 @@
 	Elements.clear();
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
-	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
-	m_Doc->scMW()->ScriptRunning = true;
+	m_Doc->scMW()->setScriptRunning(true);
 	QString CurDirP = QDir::currentPath();
 	QDir::setCurrent(fi.path());
 	QImage tmpImage;
@@ -247,7 +246,7 @@
 	}
 	else
 		tmpImage = QImage();
-	m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+	m_Doc->scMW()->setScriptRunning(false);
 	m_Doc->setLoading(false);
 	delete m_Doc;
 	QDir::setCurrent(CurDirP);
@@ -396,8 +395,7 @@
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
 	m_Doc->view()->updatesOn(false);
-	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
-	m_Doc->scMW()->ScriptRunning = true;
+	m_Doc->scMW()->setScriptRunning(true);
 	qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 	QString CurDirP = QDir::currentPath();
 	QDir::setCurrent(fi.path());
@@ -489,7 +487,7 @@
 			}
 		}
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->setLoading(false);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 		if ((Elements.count() > 0) && (!ret) && (interactive))
@@ -575,7 +573,7 @@
 	{
 		QDir::setCurrent(CurDirP);
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->view()->updatesOn(true);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 	}
Index: scribus/plugins/import/wmf/wmfimport.cpp
===================================================================
--- scribus/plugins/import/wmf/wmfimport.cpp	(revision 14753)
+++ scribus/plugins/import/wmf/wmfimport.cpp	(revision 14754)
@@ -349,8 +349,7 @@
 	m_Doc->setGUI(false, ScCore->primaryMainWindow(), 0);
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
-	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
-	m_Doc->scMW()->ScriptRunning = true;
+	m_Doc->scMW()->setScriptRunning(true);
 	m_Doc->PageColors.ensureBlackAndWhite();
 	QList<PageItem*> Elements = parseWmfCommands();
 	m_tmpSel->clear();
@@ -432,7 +431,7 @@
 		m_Doc->m_Selection->delaySignalsOff();
 		m_Doc->setLoading(false);
 	}
-	m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+	m_Doc->scMW()->setScriptRunning(false);
 	delete m_Doc;
 	QDir::setCurrent(CurDirP);
 	return tmpImage;
@@ -681,8 +680,7 @@
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
 	m_Doc->view()->updatesOn(false);
-	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
-	m_Doc->scMW()->ScriptRunning = true;
+	m_Doc->scMW()->setScriptRunning(true);
 	qApp->setOverrideCursor(QCursor(Qt::WaitCursor));
 	//gc->Family = m_Doc->toolSettings.textFont;
 	m_Doc->PageColors.ensureBlackAndWhite();
@@ -767,7 +765,7 @@
 		}
 	}
 	m_Doc->DoDrawing = true;
-	m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+	m_Doc->scMW()->setScriptRunning(false);
 	if (interactive)
 		m_Doc->setLoading(false);
 	qApp->setOverrideCursor(QCursor(Qt::ArrowCursor));
Index: scribus/plugins/import/xar/importxar.cpp
===================================================================
--- scribus/plugins/import/xar/importxar.cpp	(revision 14753)
+++ scribus/plugins/import/xar/importxar.cpp	(revision 14754)
@@ -235,8 +235,7 @@
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
 	m_Doc->view()->updatesOn(false);
-	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
-	m_Doc->scMW()->ScriptRunning = true;
+	m_Doc->scMW()->setScriptRunning(true);
 	qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 	QString CurDirP = QDir::currentPath();
 	QDir::setCurrent(fi.path());
@@ -305,7 +304,7 @@
 			}
 		}
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->setLoading(false);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 		if ((Elements.count() > 0) && (!ret) && (interactive))
@@ -381,7 +380,7 @@
 	{
 		QDir::setCurrent(CurDirP);
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->view()->updatesOn(true);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 	}
Index: scribus/plugins/import/oodraw/oodrawimp.cpp
===================================================================
--- scribus/plugins/import/oodraw/oodrawimp.cpp	(revision 14753)
+++ scribus/plugins/import/oodraw/oodrawimp.cpp	(revision 14754)
@@ -344,8 +344,7 @@
 	Elements.clear();
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
-	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
-	m_Doc->scMW()->ScriptRunning = true;
+	m_Doc->scMW()->setScriptRunning(true);
 	if (!m_Doc->PageColors.contains("Black"))
 		m_Doc->PageColors.insert("Black", ScColor(0, 0, 0, 255));
 	QDomNode drawPag = drawPagePNode.firstChild();
@@ -433,7 +432,7 @@
 		m_Doc->m_Selection->delaySignalsOff();
 		m_Doc->setLoading(false);
 	}
-	m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+	m_Doc->scMW()->setScriptRunning(false);
 	delete m_Doc;
 	QDir::setCurrent(CurDirP);
 	return tmpImage;
@@ -602,8 +601,7 @@
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
 	m_Doc->view()->updatesOn(false);
-	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
-	m_Doc->scMW()->ScriptRunning = true;
+	m_Doc->scMW()->setScriptRunning(true);
 	qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 	if (!m_Doc->PageColors.contains("Black"))
 		m_Doc->PageColors.insert("Black", ScColor(0, 0, 0, 255));
@@ -698,7 +696,7 @@
 		}
 	}
 	m_Doc->DoDrawing = true;
-	m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+	m_Doc->scMW()->setScriptRunning(false);
 	if (interactive)
 		m_Doc->setLoading(false);
 	qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
@@ -2229,3 +2227,4 @@
 	m_draws.clear();
 }
 
+
Index: scribus/plugins/import/drw/importdrw.cpp
===================================================================
--- scribus/plugins/import/drw/importdrw.cpp	(revision 14753)
+++ scribus/plugins/import/drw/importdrw.cpp	(revision 14754)
@@ -84,8 +84,7 @@
 	Elements.clear();
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
-	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
-	m_Doc->scMW()->ScriptRunning = true;
+	m_Doc->scMW()->setScriptRunning(true);
 	QString CurDirP = QDir::currentPath();
 	QDir::setCurrent(fi.path());
 	if (convert(fName))
@@ -182,7 +181,7 @@
 				tmpImage.setText("YSize", QString("%1").arg(ys));
 			}
 		}
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->setLoading(false);
 		m_Doc->m_Selection->delaySignalsOff();
 		delete m_Doc;
@@ -192,7 +191,7 @@
 	{
 		QDir::setCurrent(CurDirP);
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		delete m_Doc;
 	}
 	return QImage();
@@ -292,8 +291,7 @@
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
 	m_Doc->view()->updatesOn(false);
-	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
-	m_Doc->scMW()->ScriptRunning = true;
+	m_Doc->scMW()->setScriptRunning(true);
 	qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 	QString CurDirP = QDir::currentPath();
 	QDir::setCurrent(fi.path());
@@ -362,7 +360,7 @@
 			}
 		}
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->setLoading(false);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 		if ((Elements.count() > 0) && (!ret) && (interactive))
@@ -436,7 +434,7 @@
 	{
 		QDir::setCurrent(CurDirP);
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->view()->updatesOn(true);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 	}
Index: scribus/plugins/import/wpg/importwpg.cpp
===================================================================
--- scribus/plugins/import/wpg/importwpg.cpp	(revision 14753)
+++ scribus/plugins/import/wpg/importwpg.cpp	(revision 14754)
@@ -491,8 +491,7 @@
 	Elements.clear();
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
-	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
-	m_Doc->scMW()->ScriptRunning = true;
+	m_Doc->scMW()->setScriptRunning(true);
 	QString CurDirP = QDir::currentPath();
 	QDir::setCurrent(fi.path());
 	if (convert(fName))
@@ -577,7 +576,7 @@
 			tmpImage.setText("XSize", QString("%1").arg(xs));
 			tmpImage.setText("YSize", QString("%1").arg(ys));
 		}
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->setLoading(false);
 		m_Doc->m_Selection->delaySignalsOff();
 		delete m_Doc;
@@ -587,7 +586,7 @@
 	{
 		QDir::setCurrent(CurDirP);
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		delete m_Doc;
 	}
 	return QImage();
@@ -686,8 +685,7 @@
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
 	m_Doc->view()->updatesOn(false);
-	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
-	m_Doc->scMW()->ScriptRunning = true;
+	m_Doc->scMW()->setScriptRunning(true);
 	qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 	QString CurDirP = QDir::currentPath();
 	QDir::setCurrent(fi.path());
@@ -756,7 +754,7 @@
 			}
 		}
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->setLoading(false);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 		if ((Elements.count() > 0) && (!ret) && (interactive))
@@ -816,7 +814,7 @@
 	{
 		QDir::setCurrent(CurDirP);
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->view()->updatesOn(true);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 	}
Index: scribus/plugins/import/xfig/importxfig.cpp
===================================================================
--- scribus/plugins/import/xfig/importxfig.cpp	(revision 14753)
+++ scribus/plugins/import/xfig/importxfig.cpp	(revision 14754)
@@ -146,8 +146,7 @@
 	CustColors.insert("Gold", ScColor(255, 215, 0));
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
-	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
-	m_Doc->scMW()->ScriptRunning = true;
+	m_Doc->scMW()->setScriptRunning(true);
 	QString CurDirP = QDir::currentPath();
 	QDir::setCurrent(fi.path());
 	if (convert(fName))
@@ -232,7 +231,7 @@
 			tmpImage.setText("XSize", QString("%1").arg(xs));
 			tmpImage.setText("YSize", QString("%1").arg(ys));
 		}
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->setLoading(false);
 		m_Doc->m_Selection->delaySignalsOff();
 		delete m_Doc;
@@ -242,7 +241,7 @@
 	{
 		QDir::setCurrent(CurDirP);
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		delete m_Doc;
 	}
 	return QImage();
@@ -413,8 +412,7 @@
 	m_Doc->setLoading(true);
 	m_Doc->DoDrawing = false;
 	m_Doc->view()->updatesOn(false);
-	bool wasScriptRunning = m_Doc->scMW()->ScriptRunning;
-	m_Doc->scMW()->ScriptRunning = true;
+	m_Doc->scMW()->setScriptRunning(true);
 	qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));
 	QString CurDirP = QDir::currentPath();
 	QDir::setCurrent(fi.path());
@@ -483,7 +481,7 @@
 			}
 		}
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->setLoading(false);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 		if ((Elements.count() > 0) && (!ret) && (interactive))
@@ -548,7 +546,7 @@
 	{
 		QDir::setCurrent(CurDirP);
 		m_Doc->DoDrawing = true;
-		m_Doc->scMW()->ScriptRunning = wasScriptRunning;
+		m_Doc->scMW()->setScriptRunning(false);
 		m_Doc->view()->updatesOn(true);
 		qApp->changeOverrideCursor(QCursor(Qt::ArrowCursor));
 	}
Index: scribus/scribus.h
===================================================================
--- scribus/scribus.h	(revision 14753)
+++ scribus/scribus.h	(revision 14754)
@@ -143,6 +143,9 @@
 	void setDefaultPrinter(const QString&, const QString&, const QString&);
 	void getDefaultPrinter(QString& name, QString& file, QString& command);
 
+	inline bool scriptIsRunning(void) const { return (ScriptRunning > 0); }
+	inline void setScriptRunning(bool value) { ScriptRunning += (value ? 1 : -1); }
+
 	ScribusDoc *doFileNew(double width, double height, double topMargin, double leftMargin, double rightMargin, double bottomMargin, double columnDistance, double columnCount, bool autoTextFrames, int pageArrangement, int unitIndex, int firstPageLocation, int orientation, int firstPageNumber, const QString& defaultPageSize, bool requiresGUI, int pageCount=1, bool showView=true, int marginPreset=0);
 	ScribusDoc *newDoc(double width, double height, double topMargin, double leftMargin, double rightMargin, double bottomMargin, double columnDistance, double columnCount, bool autoTextFrames, int pageArrangement, int unitIndex, int firstPageLocation, int orientation, int firstPageNumber, const QString& defaultPageSize, bool requiresGUI, int pageCount=1, bool showView=true, int marginPreset=0);
 	bool DoFileSave(const QString& fileName, QString* savedFileName = NULL);
@@ -229,7 +232,6 @@
 	ScribusWin* ActWin;
 	QClipboard *ClipB;
 	QString LoadEnc;
-	bool ScriptRunning;
 	QMap<QString, QStringList> InstLang;
 	QMap<QString,QString> LangTransl;
 
@@ -588,6 +590,8 @@
 	void ToggleFrameEdit();
 	void NoFrameEdit();
 
+	int ScriptRunning;
+
 	QLabel* mainWindowStatusLabel;
 	QPixmap noIcon;
 	EditToolBar *editToolBar;




More information about the scribus-commit mailing list