storm-1831 Switch to use the llsyntaxid keywords LLSD directly

meow-7.2.2
Ima Mechanique 2013-11-10 20:24:13 +00:00
parent 06ed74f177
commit 5e27952ee4
3 changed files with 5 additions and 15 deletions

View File

@ -198,19 +198,10 @@ LLColor4 LLKeywords::getColorGroup(const std::string key_in)
return LLUIColorTable::instance().getColor(ColourGroup);
}
BOOL LLKeywords::initialise(ELLPath path, const std::string filename)
bool LLKeywords::initialise(LLSD SyntaxXML)
{
mReady = false;
setFilenameSyntax( gDirUtilp->getExpandedFilename(path, filename) );
if (! loadIntoLLSD(mFilenameSyntax, mSyntax) )
{
LL_ERRS("") << "Failed to load syntax data from '" << mFilenameSyntax << "', cannot continue!" << LL_ENDL;
}
else
{
mReady = true;
}
mSyntax = SyntaxXML;
mLoaded = mReady = true;
return mReady;
}

View File

@ -117,7 +117,7 @@ public:
void setFilenameSyntax(const std::string filename) { mFilenameSyntax = filename; }
void findSegments(std::vector<LLTextSegmentPtr> *seg_list, const LLWString& text, const LLColor4 &defaultColor, class LLTextEditor& editor );
BOOL initialise(ELLPath path, const std::string filename);
bool initialise(LLSD SyntaxXML);
std::string processColors();
std::string processColors(LLSD &data, const std::string strGroup);
void processTokens();

View File

@ -409,8 +409,7 @@ BOOL LLScriptEdCore::postBuild()
// Make this work ;-)
mSyntaxIdLSL.initialise();
// ...
mEditor->mKeywords.initialise(LL_PATH_APP_SETTINGS, "keywords_lsl_default.xml");
// mEditor->mKeywords.initialise(mSyntaxIdLSL.getFullFileSpec());
mEditor->mKeywords.initialise(mSyntaxIdLSL.getKeywordsXML());
// FIX: Refactor LLTextEditor::loadKeywords so these can be removed.
std::vector<std::string> funcs;