diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2009-11-05 16:17:40 +0200 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2009-11-05 16:17:40 +0200 |
commit | 3495a401458a7eb61f29b49f2a26d34c5f39544a (patch) | |
tree | 565f2acca0db7ebe1281c9a8cbaf85ce2722c343 /indra/newview/llfloaterworldmap.cpp | |
parent | a0348b7e271d8bc343ac15049c6c5ea81c4b7f3f (diff) | |
parent | 3f469dcef67a0ee79def5b10990a652a0d75eacf (diff) |
Merge from default branch
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llfloaterworldmap.cpp')
-rw-r--r-- | indra/newview/llfloaterworldmap.cpp | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index b7e8835fb8..6567c1a649 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 @@ -297,7 +327,7 @@ void LLFloaterWorldMap::onOpen(const LLSD& key) LLFirstUse::useMap(); // Start speculative download of landmarks - LLUUID landmark_folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK); + const LLUUID landmark_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK); gInventory.startBackgroundFetch(landmark_folder_id); childSetFocus("location", TRUE); |