r21342 by craig -

scribus-commit scribus-commit at lists.scribus.net
Thu May 19 21:15:49 UTC 2016


Author: craig
Date: Thu May 19 21:15:49 2016
New Revision: 21342

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21342
Log:
#9330: Fix scripter startup script. Juraj Fedel/William Bader

Modified:
    trunk/Scribus/scribus/plugins/scriptplugin/prefs_scripter.cpp
    trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp

Modified: trunk/Scribus/scribus/plugins/scriptplugin/prefs_scripter.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21342&path=/trunk/Scribus/scribus/plugins/scriptplugin/prefs_scripter.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/prefs_scripter.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/prefs_scripter.cpp	Thu May 19 21:15:49 2016
@@ -30,9 +30,7 @@
 	extensionScriptsChk->setChecked(scripterCore->extensionsEnabled());
 	// The startup script box should be disabled  if ext scripts are off
 	startupScriptEdit->setEnabled(extensionScriptsChk->isChecked());
-	connect(extensionScriptsChk, SIGNAL(toggled(bool)),
-			startupScriptEdit, SLOT(setEnabled(bool)));
-
+	startupScriptEdit->setText(scripterCore->startupScript());
 	// signals and slots connections
 	connect(extensionScriptsChk, SIGNAL(toggled(bool)), startupScriptEdit, SLOT(setEnabled(bool)));
 	// colors
@@ -43,6 +41,7 @@
 	connect(signButton, SIGNAL(clicked()), this, SLOT(setColor()));
 	connect(stringButton, SIGNAL(clicked()), this, SLOT(setColor()));
 	connect(numberButton, SIGNAL(clicked()), this, SLOT(setColor()));
+	connect(extensionScriptsChk, SIGNAL(toggled(bool)), startupScriptChangeButton, SLOT(setEnabled(bool)));
 	connect(startupScriptChangeButton, SIGNAL(clicked()), this, SLOT(changeStartupScript()));
 }
 

Modified: trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21342&path=/trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp	(original)
+++ trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp	Thu May 19 21:15:49 2016
@@ -574,7 +574,8 @@
 			this->slotRunScriptFile(this->m_startupScript, true);
 		}
 		else
-			qDebug("Startup script enabled, but couln't find script %s.", m_startupScript.toLatin1().constData());
+			ScMessageBox::warning(ScCore->primaryMainWindow(), tr("Startup Script error"),
+					      tr("Could not find script: %1.").arg( m_startupScript));
 	}
 }
 




More information about the scribus-commit mailing list