CHUI-583 FIXED Link will be opened in external browser if this preference is set.

meow-7.2.2
maxim@mnikolenko 2012-12-24 14:20:25 +02:00
parent dd7509f56d
commit 923262f154
2 changed files with 22 additions and 7 deletions

View File

@ -7586,6 +7586,20 @@ void handle_web_content_test(const LLSD& param)
LLWeb::loadURLInternal(url);
}
void handle_show_url(const LLSD& param)
{
std::string url = param.asString();
if(gSavedSettings.getBOOL("UseExternalBrowser"))
{
LLWeb::loadURLExternal(url);
}
else
{
LLWeb::loadURLInternal(url);
}
}
void handle_buy_currency_test(void*)
{
std::string url =
@ -8415,6 +8429,7 @@ void initialize_menus()
// Advanced > UI
commit.add("Advanced.WebBrowserTest", boost::bind(&handle_web_browser_test, _2)); // sigh! this one opens the MEDIA browser
commit.add("Advanced.WebContentTest", boost::bind(&handle_web_content_test, _2)); // this one opens the Web Content floater
commit.add("Advanced.ShowURL", boost::bind(&handle_show_url, _2));
view_listener_t::addMenu(new LLAdvancedBuyCurrencyTest(), "Advanced.BuyCurrencyTest");
view_listener_t::addMenu(new LLAdvancedDumpSelectMgr(), "Advanced.DumpSelectMgr");
view_listener_t::addMenu(new LLAdvancedDumpInventory(), "Advanced.DumpInventory");

View File

@ -1273,35 +1273,35 @@
label="User’s guide"
name="User’s guide">
<menu_item_call.on_click
function="Advanced.WebBrowserTest"
function="Advanced.ShowURL"
parameter="http://community.secondlife.com/t5/English-Knowledge-Base/Second-Life-User-s-Guide/ta-p/1244857"/>
</menu_item_call>
<menu_item_call
label="Knowledge Base"
name="Knowledge Base">
<menu_item_call.on_click
function="Advanced.WebBrowserTest"
function="Advanced.ShowURL"
parameter="http://community.secondlife.com/t5/tkb/communitypage"/>
</menu_item_call>
<menu_item_call
label="Wiki"
name="Wiki">
<menu_item_call.on_click
function="Advanced.WebBrowserTest"
function="Advanced.ShowURL"
parameter="http://wiki.secondlife.com"/>
</menu_item_call>
<menu_item_call
label="Community Forums"
name="Community Forums">
<menu_item_call.on_click
function="Advanced.WebBrowserTest"
function="Advanced.ShowURL"
parameter="http://community.secondlife.com/t5/Forums/ct-p/Forums"/>
</menu_item_call>
<menu_item_call
label="Support portal"
name="Support portal">
<menu_item_call.on_click
function="Advanced.WebBrowserTest"
function="Advanced.ShowURL"
parameter="https://support.secondlife.com/"/>
</menu_item_call>
<menu_item_separator/>
@ -1309,14 +1309,14 @@
label="[SECOND_LIFE] News"
name="Second Life News">
<menu_item_call.on_click
function="Advanced.WebBrowserTest"
function="Advanced.ShowURL"
parameter="http://community.secondlife.com/t5/Featured-News/bg-p/blog_feature_news"/>
</menu_item_call>
<menu_item_call
label="[SECOND_LIFE] Blogs"
name="Second Life Blogs">
<menu_item_call.on_click
function="Advanced.WebBrowserTest"
function="Advanced.ShowURL"
parameter="http://community.secondlife.com/t5/Blogs/ct-p/Blogs"/>
</menu_item_call>
<menu_item_separator/>