diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llui/lltexteditor.cpp | 39 |
1 files changed, 27 insertions, 12 deletions
diff --git a/linden/indra/llui/lltexteditor.cpp b/linden/indra/llui/lltexteditor.cpp index 12ad339..1f13bbb 100644 --- a/linden/indra/llui/lltexteditor.cpp +++ b/linden/indra/llui/lltexteditor.cpp | |||
@@ -967,17 +967,6 @@ void LLTextEditor::endSelection() | |||
967 | mIsSelecting = FALSE; | 967 | mIsSelecting = FALSE; |
968 | mSelectionEnd = mCursorPos; | 968 | mSelectionEnd = mCursorPos; |
969 | } | 969 | } |
970 | if (mParseHTML && mHTML.length() > 0) | ||
971 | { | ||
972 | //Special handling for slurls | ||
973 | if ( (mSecondlifeURLcallback!=NULL) && !(*mSecondlifeURLcallback)(mHTML) ) | ||
974 | { | ||
975 | if (mURLcallback!=NULL) (*mURLcallback)(mHTML.c_str()); | ||
976 | |||
977 | //load_url(url.c_str()); | ||
978 | } | ||
979 | mHTML=""; | ||
980 | } | ||
981 | } | 970 | } |
982 | 971 | ||
983 | BOOL LLTextEditor::selectionContainsLineBreaks() | 972 | BOOL LLTextEditor::selectionContainsLineBreaks() |
@@ -1408,6 +1397,7 @@ BOOL LLTextEditor::handleMouseUp(S32 x, S32 y, MASK mask) | |||
1408 | if( hasMouseCapture() ) | 1397 | if( hasMouseCapture() ) |
1409 | { | 1398 | { |
1410 | gFocusMgr.setMouseCapture( NULL ); | 1399 | gFocusMgr.setMouseCapture( NULL ); |
1400 | |||
1411 | handled = TRUE; | 1401 | handled = TRUE; |
1412 | } | 1402 | } |
1413 | 1403 | ||
@@ -2831,7 +2821,10 @@ void LLTextEditor::drawCursor() | |||
2831 | { | 2821 | { |
2832 | mLastIMEPosition.mX = ime_pos.mX; | 2822 | mLastIMEPosition.mX = ime_pos.mX; |
2833 | mLastIMEPosition.mY = ime_pos.mY; | 2823 | mLastIMEPosition.mY = ime_pos.mY; |
2834 | getWindow()->setLanguageTextInput( ime_pos ); | 2824 | |
2825 | ime_pos.mX = (S32) (ime_pos.mX * LLUI::sGLScaleFactor.mV[VX]); | ||
2826 | ime_pos.mY = (S32) (ime_pos.mY * LLUI::sGLScaleFactor.mV[VY]); | ||
2827 | getWindow()->setLanguageTextInput( ime_pos ); | ||
2835 | } | 2828 | } |
2836 | } | 2829 | } |
2837 | } | 2830 | } |
@@ -3814,6 +3807,22 @@ void LLTextEditor::findEmbeddedItemSegments() | |||
3814 | 3807 | ||
3815 | BOOL LLTextEditor::handleMouseUpOverSegment(S32 x, S32 y, MASK mask) | 3808 | BOOL LLTextEditor::handleMouseUpOverSegment(S32 x, S32 y, MASK mask) |
3816 | { | 3809 | { |
3810 | if ( hasMouseCapture() ) | ||
3811 | { | ||
3812 | // This mouse up was part of a click. | ||
3813 | // Regardless of where the cursor is, see if we recently touched a link | ||
3814 | // and launch it if we did. | ||
3815 | if (mParseHTML && mHTML.length() > 0) | ||
3816 | { | ||
3817 | //Special handling for slurls | ||
3818 | if ( (mSecondlifeURLcallback!=NULL) && !(*mSecondlifeURLcallback)(mHTML) ) | ||
3819 | { | ||
3820 | if (mURLcallback!=NULL) (*mURLcallback)(mHTML.c_str()); | ||
3821 | } | ||
3822 | mHTML=""; | ||
3823 | } | ||
3824 | } | ||
3825 | |||
3817 | return FALSE; | 3826 | return FALSE; |
3818 | } | 3827 | } |
3819 | 3828 | ||
@@ -4245,6 +4254,12 @@ BOOL LLTextEditor::findHTML(const LLString &line, S32 *begin, S32 *end) | |||
4245 | strpos = url.find(slurlID); | 4254 | strpos = url.find(slurlID); |
4246 | } | 4255 | } |
4247 | 4256 | ||
4257 | if (strpos < 0) | ||
4258 | { | ||
4259 | slurlID="sl://"; | ||
4260 | strpos = url.find(slurlID); | ||
4261 | } | ||
4262 | |||
4248 | if (strpos >= 0) | 4263 | if (strpos >= 0) |
4249 | { | 4264 | { |
4250 | strpos+=slurlID.length(); | 4265 | strpos+=slurlID.length(); |