summaryrefslogtreecommitdiff
path: root/indra/llui/lltextbase.cpp
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2016-05-10 16:09:25 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2016-05-10 16:09:25 +0300
commitb1243c55e5579f72e3dd9dafe2b53173349a047f (patch)
tree9d9e0b018059483973a8e6f76644b0875d2534a3 /indra/llui/lltextbase.cpp
parent042930b59a82f706f16e4b67a683697aed65112f (diff)
parent7f5e6cea124e1193b199a3eabd50bdab96340c13 (diff)
Merged in oz_linden/maint-5974
Diffstat (limited to 'indra/llui/lltextbase.cpp')
-rwxr-xr-xindra/llui/lltextbase.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 4309e6557e..4ccf1ef009 100755
--- 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),
@@ -1937,7 +1939,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 +3229,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;
}
}