summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rw-r--r--[-rwxr-xr-x]indra/llui/lltextbase.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 4309e6557e..616c42895c 100755..100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -164,6 +164,7 @@ LLTextBase::Params::Params()
trusted_content("trusted_content", true),
use_ellipses("use_ellipses", false),
parse_urls("parse_urls", false),
+ force_urls_external("force_urls_external", false),
parse_highlights("parse_highlights", false)
{
addSynonym(track_end, "track_bottom");
@@ -216,6 +217,7 @@ LLTextBase::LLTextBase(const LLTextBase::Params &p)
mWordWrap(p.wrap),
mUseEllipses( p.use_ellipses ),
mParseHTML(p.parse_urls),
+ mForceUrlsExternal(p.force_urls_external),
mParseHighlights(p.parse_highlights),
mBGVisible(p.bg_visible),
mScroller(NULL),
@@ -1317,6 +1319,7 @@ void LLTextBase::replaceWithSuggestion(U32 index)
setCursorPos(it->first + (S32)suggestion.length());
+ onSpellCheckPerformed();
break;
}
@@ -1937,7 +1940,7 @@ void LLTextBase::createUrlContextMenu(S32 x, S32 y, const std::string &in_url)
registrar.add("Url.Open", boost::bind(&LLUrlAction::openURL, url));
registrar.add("Url.OpenInternal", boost::bind(&LLUrlAction::openURLInternal, url));
registrar.add("Url.OpenExternal", boost::bind(&LLUrlAction::openURLExternal, url));
- registrar.add("Url.Execute", boost::bind(&LLUrlAction::executeSLURL, url));
+ registrar.add("Url.Execute", boost::bind(&LLUrlAction::executeSLURL, url, true));
registrar.add("Url.Block", boost::bind(&LLUrlAction::blockObject, url));
registrar.add("Url.Teleport", boost::bind(&LLUrlAction::teleportToLocation, url));
registrar.add("Url.ShowProfile", boost::bind(&LLUrlAction::showProfile, url));
@@ -3227,7 +3230,15 @@ BOOL LLNormalTextSegment::handleMouseUp(S32 x, S32 y, MASK mask)
// Only process the click if it's actually in this segment, not to the right of the end-of-line.
if(mEditor.getSegmentAtLocalPos(x, y, false) == this)
{
- LLUrlAction::clickAction(getStyle()->getLinkHREF(), mEditor.isContentTrusted());
+ std::string url = getStyle()->getLinkHREF();
+ if (!mEditor.mForceUrlsExternal)
+ {
+ LLUrlAction::clickAction(url, mEditor.isContentTrusted());
+ }
+ else if (!LLUrlAction::executeSLURL(url, mEditor.isContentTrusted()))
+ {
+ LLUrlAction::openURLExternal(url);
+ }
return TRUE;
}
}