Skip to content
Snippets Groups Projects
Commit ac59a7c1 authored by Rick Pasetto's avatar Rick Pasetto
Browse files
parents 9d003c9e ce43dfab
No related branches found
No related tags found
No related merge requests found
......@@ -982,16 +982,20 @@ void LLMediaCtrl::onClickLinkHref( LLPluginClassMedia* self )
U32 target_type = self->getClickTargetType();
// is there is a target specified for the link?
if (gSavedSettings.getBOOL("UseExternalBrowser") || target_type == LLPluginClassMedia::TARGET_EXTERNAL)
if (target_type == LLPluginClassMedia::TARGET_EXTERNAL ||
target_type == LLPluginClassMedia::TARGET_BLANK )
{
LLSD payload;
payload["url"] = url;
payload["target_type"] = LLSD::Integer(target_type);
LLNotificationsUtil::add( "WebLaunchExternalTarget", LLSD(), payload, onClickLinkExternalTarget);
}
else if (target_type == LLPluginClassMedia::TARGET_BLANK)
{
clickLinkWithTarget(url, target_type);
if (gSavedSettings.getBOOL("UseExternalBrowser"))
{
LLSD payload;
payload["url"] = url;
payload["target_type"] = LLSD::Integer(target_type);
LLNotificationsUtil::add( "WebLaunchExternalTarget", LLSD(), payload, onClickLinkExternalTarget);
}
else
{
clickLinkWithTarget(url, target_type);
}
}
else {
const std::string protocol1( "http://" );
......@@ -1042,7 +1046,7 @@ bool LLMediaCtrl::onClickLinkExternalTarget(const LLSD& notification, const LLSD
// static
void LLMediaCtrl::clickLinkWithTarget(const std::string& url, const S32& target_type )
{
if (gSavedSettings.getBOOL("UseExternalBrowser") || target_type == LLPluginClassMedia::TARGET_EXTERNAL)
if (target_type == LLPluginClassMedia::TARGET_EXTERNAL)
{
// load target in an external browser
LLWeb::loadURLExternal(url);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment