diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2009-11-03 15:55:53 -0700 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2009-11-03 15:55:53 -0700 |
commit | 81e719387983990fe0a2a197a6e09059219c119a (patch) | |
tree | f9f8b1bcab20e99413311f758dac521a3093050b /indra/newview/llfloaterworldmap.cpp | |
parent | eaa1ce61b084f23746934e0a7b899242045d691b (diff) | |
parent | 9637333708a84a73784248cb842df68e520a311a (diff) |
merge
Diffstat (limited to 'indra/newview/llfloaterworldmap.cpp')
-rw-r--r-- | indra/newview/llfloaterworldmap.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index b7e8835fb8..f3f600149f 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -45,6 +45,7 @@ #include "llcallingcard.h" #include "llcombobox.h" #include "llviewercontrol.h" +#include "llcommandhandler.h" #include "lldraghandle.h" #include "llfirstuse.h" #include "llfloaterreg.h" // getTypedInstance() @@ -96,6 +97,35 @@ static const F32 SIM_COORD_DEFAULT = 128.f; // Globals //--------------------------------------------------------------------------- +// handle secondlife:///app/worldmap/{NAME}/{COORDS} URLs +class LLWorldMapHandler : public LLCommandHandler +{ +public: + // requires trusted browser to trigger + LLWorldMapHandler() : LLCommandHandler("worldmap", UNTRUSTED_THROTTLE) { } + + bool handle(const LLSD& params, const LLSD& query_map, + LLMediaCtrl* web) + { + if (params.size() == 0) + { + return false; + } + + const std::string region_name = params[0].asString(); + S32 x = (params.size() > 1) ? params[1].asInteger() : 128; + S32 y = (params.size() > 2) ? params[2].asInteger() : 128; + S32 z = (params.size() > 3) ? params[3].asInteger() : 0; + + LLFloaterWorldMap::getInstance()->trackURL(region_name, x, y, z); + LLFloaterReg::showInstance("world_map", "center"); + + return true; + } +}; +LLWorldMapHandler gWorldMapHandler; + + LLFloaterWorldMap* gFloaterWorldMap = NULL; class LLMapInventoryObserver : public LLInventoryObserver |