diff options
author | maxim@mnikolenko <maxim@mnikolenko> | 2012-12-24 14:20:25 +0200 |
---|---|---|
committer | maxim@mnikolenko <maxim@mnikolenko> | 2012-12-24 14:20:25 +0200 |
commit | 923262f154748eea5ce1eda37df1b9df1eaf0f43 (patch) | |
tree | 512f036a8064fad3c067a39ec5d9ec8c5d8d5687 /indra | |
parent | dd7509f56de5e8a47680b33176e90c11ed518066 (diff) |
CHUI-583 FIXED Link will be opened in external browser if this preference is set.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/llviewermenu.cpp | 15 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/menu_viewer.xml | 14 |
2 files changed, 22 insertions, 7 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index fe9c00cc27..be9f7d645a 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -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"); diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml index 00424e97f6..76de81559b 100644 --- a/indra/newview/skins/default/xui/en/menu_viewer.xml +++ b/indra/newview/skins/default/xui/en/menu_viewer.xml @@ -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/> |