Cleanup and add back an opt in text editor

This commit is contained in:
Lirusaito
2019-01-18 02:14:31 -05:00
parent 6e05e8d84b
commit 0c8f2f1ea0
4 changed files with 8 additions and 10 deletions

View File

@@ -96,9 +96,6 @@ const S32 PREEDIT_STANDOUT_GAP = 1;
const S32 PREEDIT_STANDOUT_POSITION = 2; const S32 PREEDIT_STANDOUT_POSITION = 2;
const S32 PREEDIT_STANDOUT_THICKNESS = 2; const S32 PREEDIT_STANDOUT_THICKNESS = 2;
LLColor4 LLTextEditor::mLinkColor = LLColor4::blue;
/////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////
class LLTextEditor::LLTextCmdInsert : public LLTextEditor::LLTextCmd class LLTextEditor::LLTextCmdInsert : public LLTextEditor::LLTextCmd
@@ -670,6 +667,9 @@ void LLTextEditor::setText(const LLStringExplicit &utf8str)
setCursorPos(0); setCursorPos(0);
resetDirty(); resetDirty();
mUTF8Text = text;
mTextIsUpToDate = true;
} }
void LLTextEditor::setWText(const LLWString& text) void LLTextEditor::setWText(const LLWString& text)
@@ -4672,6 +4672,11 @@ void LLTextEditor::updateSegments()
} }
} }
updateTextSegments();
}
void LLTextEditor::updateTextSegments()
{
LL_RECORD_BLOCK_TIME(FTM_UPDATE_TEXT_SEGMENTS); LL_RECORD_BLOCK_TIME(FTM_UPDATE_TEXT_SEGMENTS);
// Make sure we have at least one segment // Make sure we have at least one segment
if (mSegments.size() == 1 && mSegments[0]->getIsDefault()) if (mSegments.size() == 1 && mSegments[0]->getIsDefault())

View File

@@ -260,8 +260,6 @@ public:
void setHandleEditKeysDirectly( BOOL b ) { mHandleEditKeysDirectly = b; } void setHandleEditKeysDirectly( BOOL b ) { mHandleEditKeysDirectly = b; }
// Callbacks
static void setLinkColor(LLColor4 color) { mLinkColor = color; }
void setOnScrollEndCallback(void (*callback)(void*), void* userdata); void setOnScrollEndCallback(void (*callback)(void*), void* userdata);
@@ -506,7 +504,6 @@ private:
// Data // Data
// //
LLKeywords mKeywords; LLKeywords mKeywords;
static LLColor4 mLinkColor;
// Concrete LLTextCmd sub-classes used by the LLTextEditor base class // Concrete LLTextCmd sub-classes used by the LLTextEditor base class
class LLTextCmdInsert; class LLTextCmdInsert;

View File

@@ -179,7 +179,6 @@ void LLPrefsChatImpl::apply()
gSavedSettings.setColor4("BackgroundChatColor", childGetValue("background")); gSavedSettings.setColor4("BackgroundChatColor", childGetValue("background"));
gSavedSettings.setColor4("HTMLLinkColor", childGetValue("links")); gSavedSettings.setColor4("HTMLLinkColor", childGetValue("links"));
LLTextEditor::setLinkColor(childGetValue("links"));
gSavedSettings.setBOOL("ArrowKeysMoveAvatar", childGetValue("arrow_keys_move_avatar_check")); gSavedSettings.setBOOL("ArrowKeysMoveAvatar", childGetValue("arrow_keys_move_avatar_check"));
gSavedSettings.setBOOL("ChatShowTimestamps", childGetValue("show_timestamps_check")); gSavedSettings.setBOOL("ChatShowTimestamps", childGetValue("show_timestamps_check"));

View File

@@ -1132,9 +1132,6 @@ bool idle_startup()
//LLPanelLogin::close(); //LLPanelLogin::close();
} }
//For HTML parsing in text boxes.
LLTextEditor::setLinkColor( gSavedSettings.getColor4("HTMLLinkColor") );
// Load URL History File // Load URL History File
LLURLHistory::loadFile("url_history.xml"); LLURLHistory::loadFile("url_history.xml");
// Load media plugin cookies // Load media plugin cookies