StelScriptMgr.cpp   StelScriptMgr.cpp 
skipping to change at line 168 skipping to change at line 168
engine.globalObject().setProperty(m->objectName(), objectVal ue); engine.globalObject().setProperty(m->objectName(), objectVal ue);
} }
} }
QStringList StelScriptMgr::getScriptList() QStringList StelScriptMgr::getScriptList()
{ {
QStringList scriptFiles; QStringList scriptFiles;
QSet<QString> files = StelFileMgr::listContents("scripts", StelFileM gr::File, true); QSet<QString> files = StelFileMgr::listContents("scripts", StelFileM gr::File, true);
#ifdef ENABLE_STRATOSCRIPT_COMPAT
QRegExp fileRE("^.*\\.(ssc|sts)$");
#else // ENABLE_STRATOSCRIPT_COMPAT
QRegExp fileRE("^.*\\.ssc$"); QRegExp fileRE("^.*\\.ssc$");
#endif // ENABLE_STRATOSCRIPT_COMPAT
foreach(const QString& f, files) foreach(const QString& f, files)
{ {
if (fileRE.exactMatch(f)) if (fileRE.exactMatch(f))
scriptFiles << f; scriptFiles << f;
} }
return scriptFiles; return scriptFiles;
} }
bool StelScriptMgr::scriptIsRunning() bool StelScriptMgr::scriptIsRunning()
{ {
skipping to change at line 348 skipping to change at line 344
return false; return false;
} }
scriptFileName = fileName; scriptFileName = fileName;
if (!includePath.isEmpty()) if (!includePath.isEmpty())
scriptDir = includePath; scriptDir = includePath;
QString preprocessedScript; QString preprocessedScript;
bool ok = false; bool ok = false;
if (fileName.endsWith(".ssc")) if (fileName.endsWith(".ssc"))
ok = preprocessScript(fic, preprocessedScript, scriptDir); ok = preprocessScript(fic, preprocessedScript, scriptDir);
#ifdef ENABLE_STRATOSCRIPT_COMPAT
else if (fileName.endsWith(".sts"))
ok = preprocessStratoScript(fic, preprocessedScript, scriptD
ir);
#endif
if (!ok) if (!ok)
{ {
return false; return false;
} }
return runPreprocessedScript(preprocessedScript); return runPreprocessedScript(preprocessedScript);
} }
void StelScriptMgr::stopScript() void StelScriptMgr::stopScript()
{ {
if (engine.isEvaluating()) if (engine.isEvaluating())
 End of changes. 3 change blocks. 
9 lines changed or deleted 0 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/