From b512865746bde3b6ebfa64c87a3a56f7f6214348 Mon Sep 17 00:00:00 2001 From: leyla_linden Date: Wed, 22 Dec 2010 16:50:03 -0800 Subject: added open advanced floater link --- indra/newview/llviewerfloaterreg.cpp | 26 +++++++++++++++++++++- .../skins/default/xui/en/floater_model_wizard.xml | 4 ++-- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 849ac7c830..8c06eb7f5d 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -123,9 +123,33 @@ #include "llsyswellwindow.h" #include "llscriptfloater.h" #include "llfloatermodelpreview.h" +#include "llcommandhandler.h" // *NOTE: Please add files in alphabetical order to keep merges easy. +// handle secondlife:///app/floater/{NAME} URLs +class LLFloaterOpenHandler : public LLCommandHandler +{ +public: + // requires trusted browser to trigger + LLFloaterOpenHandler() : LLCommandHandler("floater", UNTRUSTED_THROTTLE) { } + + bool handle(const LLSD& params, const LLSD& query_map, + LLMediaCtrl* web) + { + if (params.size() != 1) + { + return false; + } + + const std::string floater_name = LLURI::unescape(params[0].asString()); + LLFloaterReg::showInstance(floater_name); + + return true; + } +}; + +LLFloaterOpenHandler gFloaterOpenHandler; void LLViewerFloaterReg::registerFloaters() { @@ -252,7 +276,7 @@ void LLViewerFloaterReg::registerFloaters() LLFloaterReg::add("upload_image", "floater_image_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "upload"); LLFloaterReg::add("upload_sound", "floater_sound_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "upload"); LLFloaterReg::add("upload_model", "floater_model_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "upload"); - LLFloaterReg::add("upload_model_wizard", "floater_model_wizard.xml", (LLFloaterBuildFunc)&LLFloaterReg::build, "upload"); + LLFloaterReg::add("upload_model_wizard", "floater_model_wizard.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("voice_controls", "floater_voice_controls.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); LLFloaterReg::add("voice_effect", "floater_voice_effect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build); diff --git a/indra/newview/skins/default/xui/en/floater_model_wizard.xml b/indra/newview/skins/default/xui/en/floater_model_wizard.xml index f5eda05f1a..6a0e9d1c39 100644 --- a/indra/newview/skins/default/xui/en/floater_model_wizard.xml +++ b/indra/newview/skins/default/xui/en/floater_model_wizard.xml @@ -208,7 +208,7 @@ left="10" word_wrap="true"> Note: -Advanced users familiar with 3d content creation tools may prefer to use the Advanced Mesh Import window. +Advanced users familiar with 3d content creation tools may prefer to use the [secondlife:///app/floater/upload_model Advanced Mesh Import Window] . @@ -381,7 +381,7 @@ Advanced users familiar with 3d content creation tools may prefer to use the Adv show_text="false" top="105" width="250" /> - | | | + ' ' ' -- cgit v1.2.3