summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rwxr-xr-xindra/llui/llkeywords.cpp7
-rwxr-xr-xindra/llui/llkeywords.h5
-rwxr-xr-xindra/newview/CMakeLists.txt2
-rwxr-xr-xindra/newview/llpreviewscript.cpp10
-rwxr-xr-xindra/newview/llpreviewscript.h2
5 files changed, 19 insertions, 7 deletions
diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp
index 58d213e29c..687c2fb31d 100755
--- a/indra/llui/llkeywords.cpp
+++ b/indra/llui/llkeywords.cpp
@@ -29,13 +29,11 @@
#include <iostream>
#include <fstream>
-#include "lldir.h"
#include "llkeywords.h"
#include "llsdserialize.h"
#include "lltexteditor.h"
#include "llstl.h"
-
inline BOOL LLKeywordToken::isHead(const llwchar* s) const
{
// strncmp is much faster than string compare
@@ -71,7 +69,7 @@ inline BOOL LLKeywordToken::isTail(const llwchar* s) const
LLKeywords::LLKeywords() : mLoaded(FALSE)
{
- setFilenameSyntax( gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"keywords_lsl_default.xml") );
+ //setFilenameSyntax( gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS,"keywords_lsl_default.xml") );
}
LLKeywords::~LLKeywords()
@@ -200,9 +198,10 @@ LLColor4 LLKeywords::getColorGroup(const std::string key_in)
return LLUIColorTable::instance().getColor(ColourGroup);
}
-BOOL LLKeywords::initialise()
+BOOL LLKeywords::initialise(ELLPath path, const std::string filename)
{
mReady = false;
+ setFilenameSyntax( gDirUtilp->getExpandedFilename(path, filename) );
if (! loadIntoLLSD(mFilenameSyntax, mSyntax) )
{
diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h
index 6889b95339..1bd23549d2 100755
--- a/indra/llui/llkeywords.h
+++ b/indra/llui/llkeywords.h
@@ -28,6 +28,7 @@
#define LL_LLKEYWORDS_H
+#include "lldir.h"
#include "llstring.h"
#include "v3color.h"
#include "v4color.h"
@@ -116,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();
+ BOOL initialise(ELLPath path, const std::string filename);
std::string processColors();
std::string processColors(LLSD &data, const std::string strGroup);
void processTokens();
@@ -193,7 +194,7 @@ protected:
std::string getArguments(LLSD& args);
private:
- BOOL ready() { return mReady; };
+ BOOL ready() { return mReady; }
BOOL mReady;
std::string mFilenameSyntax;
};
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 97243bc8b1..b7627f2eb0 100755
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -519,6 +519,7 @@ set(viewer_SOURCE_FILES
llstylemap.cpp
llsurface.cpp
llsurfacepatch.cpp
+ llsyntaxid.cpp
llsyswellitem.cpp
llsyswellwindow.cpp
llteleporthistory.cpp
@@ -1093,6 +1094,7 @@ set(viewer_HEADER_FILES
llstylemap.h
llsurface.h
llsurfacepatch.h
+ llsyntaxid.h
llsyswellitem.h
llsyswellwindow.h
lltable.h
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 2e9907fcd2..62e1d765b3 100755
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -406,7 +406,15 @@ BOOL LLScriptEdCore::postBuild()
initMenu();
- mEditor->mKeywords.initialise();
+// Make this work ;-)
+ mSyntaxLSL = LLSyntaxIdLSL();
+
+// mSyntaxLSL.initialise();
+// mSyntaxLSL.mKeywords = &mEditor->mKeywords;
+ // ...
+// mSyntaxLSL->mKeywords.initialise();
+// Move into the SyntaxIdLSL class
+ mEditor->mKeywords.initialise(mSyntaxLSL.filenamePath(), mSyntaxLSL.filenameCurrent());
// FIX: Refactor LLTextEditor::loadKeywords so these can be removed.
std::vector<std::string> funcs;
diff --git a/indra/newview/llpreviewscript.h b/indra/newview/llpreviewscript.h
index 9fb0a4fb63..21e33f30d5 100755
--- a/indra/newview/llpreviewscript.h
+++ b/indra/newview/llpreviewscript.h
@@ -35,6 +35,7 @@
#include "lliconctrl.h"
#include "llframetimer.h"
#include "llfloatergotoline.h"
+#include "llsyntaxid.h"
class LLLiveLSLFile;
class LLMessageSystem;
@@ -149,6 +150,7 @@ private:
BOOL mEnableSave;
BOOL mHasScriptData;
LLLiveLSLFile* mLiveFile;
+ LLSyntaxIdLSL mSyntaxLSL;
LLScriptEdContainer* mContainer; // parent view
};