Added DisableExternalBrowser setting.

Reviewed by Callum.
master
Monroe Linden 2010-10-06 16:50:04 -07:00
parent f5b3fc596d
commit f974a019b1
2 changed files with 18 additions and 0 deletions

View File

@ -2545,6 +2545,17 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>DisableExternalBrowser</key>
<map>
<key>Comment</key>
<string>Disable opening an external browser.</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>DisableRendering</key>
<map>
<key>Comment</key>

View File

@ -116,6 +116,13 @@ void LLWeb::loadURLExternal(const std::string& url, bool async, const std::strin
// Act like the proxy window was closed, since we won't be able to track targeted windows in the external browser.
LLViewerMedia::proxyWindowClosed(uuid);
if(gSavedSettings.getBOOL("DisableExternalBrowser"))
{
// Don't open an external browser under any circumstances.
llwarns << "Blocked attempt to open external browser." << llendl;
return;
}
LLSD payload;
payload["url"] = url;
LLNotificationsUtil::add( "WebLaunchExternalTarget", LLSD(), payload, boost::bind(on_load_url_external_response, _1, _2, async));