Initial moap commit. /VERY/ WIP. Primarily committed to clean up unstaged changes. Do not run this, even if it may compile, as it will NOT work (for a myriad of reasons)!
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
#include "llui.h"
|
||||
#include "lluictrlfactory.h"
|
||||
#include "lluiimage.h"
|
||||
#include "llurlaction.h"
|
||||
#include "llrect.h"
|
||||
#include "llfocusmgr.h"
|
||||
#include "lltimer.h"
|
||||
@@ -96,10 +97,6 @@ const S32 PREEDIT_STANDOUT_THICKNESS = 2;
|
||||
|
||||
|
||||
LLColor4 LLTextEditor::mLinkColor = LLColor4::blue;
|
||||
void (* LLTextEditor::mURLcallback)(const std::string&) = NULL;
|
||||
bool (* LLTextEditor::mSecondlifeURLcallback)(const std::string&) = NULL;
|
||||
bool (* LLTextEditor::mSecondlifeURLcallbackRightClick)(const std::string&) = NULL;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -4350,11 +4347,15 @@ void LLTextEditor::loadKeywords(const std::string& filename,
|
||||
std::string name = utf8str_trim(funcs[i]);
|
||||
mKeywords.addToken(LLKeywordToken::WORD, name, color, tooltips[i] );
|
||||
}
|
||||
segment_list_t segment_list;
|
||||
mKeywords.findSegments(&segment_list, getWText(), mDefaultColor);
|
||||
|
||||
mKeywords.findSegments( &mSegments, mWText, mDefaultColor );
|
||||
|
||||
llassert( mSegments.front()->getStart() == 0 );
|
||||
llassert( mSegments.back()->getEnd() == getLength() );
|
||||
mSegments.clear();
|
||||
segment_list_t::iterator insert_it = mSegments.begin();
|
||||
for (segment_list_t::iterator list_it = segment_list.begin(); list_it != segment_list.end(); ++list_it)
|
||||
{
|
||||
insert_it = mSegments.insert(insert_it, *list_it);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4493,11 +4494,7 @@ BOOL LLTextEditor::handleMouseUpOverSegment(S32 x, S32 y, MASK mask)
|
||||
// and launch it if we did.
|
||||
if (mParseHTML && mHTML.length() > 0)
|
||||
{
|
||||
//Special handling for slurls
|
||||
if ( (mSecondlifeURLcallback!=NULL) && !(*mSecondlifeURLcallback)(mHTML) )
|
||||
{
|
||||
if (mURLcallback!=NULL) (*mURLcallback)(mHTML);
|
||||
}
|
||||
LLUrlAction::clickAction(mHTML);
|
||||
mHTML.clear();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user