diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-07-20 14:33:35 +0300 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-07-20 14:33:35 +0300 |
commit | e60ff27ad4a08cce59825ecd965b6f5c638dd4db (patch) | |
tree | 1c48f1a36610c4484229d0bd54e0fe7cf824047b /indra/newview/llpanelplaces.cpp | |
parent | 760d0b95573303a67cdf0745385acfb17b81735d (diff) | |
parent | 2c6bca70559e99731d25607003006108323f9904 (diff) |
Merge from default branch
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llpanelplaces.cpp')
-rw-r--r-- | indra/newview/llpanelplaces.cpp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 705b196ef1..07adb18902 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -54,6 +54,7 @@ #include "llagent.h" #include "llagentpicksinfo.h" #include "llavatarpropertiesprocessor.h" +#include "llcommandhandler.h" #include "llfloaterworldmap.h" #include "llinventorybridge.h" #include "llinventoryobserver.h" @@ -66,6 +67,7 @@ #include "llpanelplaceprofile.h" #include "llpanelteleporthistory.h" #include "llremoteparcelrequest.h" +#include "llsidetray.h" #include "llteleporthistorystorage.h" #include "lltoggleablemenu.h" #include "llviewerinventory.h" @@ -75,6 +77,7 @@ #include "llviewerregion.h" #include "llviewerwindow.h" +// Constants static const S32 LANDMARK_FOLDERS_MENU_WIDTH = 250; static const F32 PLACE_INFO_UPDATE_INTERVAL = 3.0; static const std::string AGENT_INFO_TYPE = "agent"; @@ -83,6 +86,40 @@ static const std::string LANDMARK_INFO_TYPE = "landmark"; static const std::string REMOTE_PLACE_INFO_TYPE = "remote_place"; static const std::string TELEPORT_HISTORY_INFO_TYPE = "teleport_history"; +// Support for secondlife:///app/parcel/{UUID}/about SLapps +class LLParcelHandler : public LLCommandHandler +{ +public: + // requires trusted browser to trigger + LLParcelHandler() : LLCommandHandler("parcel", UNTRUSTED_THROTTLE) { } + bool handle(const LLSD& params, const LLSD& query_map, + LLMediaCtrl* web) + { + if (params.size() < 2) + { + return false; + } + LLUUID parcel_id; + if (!parcel_id.set(params[0], FALSE)) + { + return false; + } + if (params[1].asString() == "about") + { + if (parcel_id.notNull()) + { + LLSD key; + key["type"] = "remote_place"; + key["id"] = parcel_id; + LLSideTray::getInstance()->showPanel("panel_places", key); + return true; + } + } + return false; + } +}; +LLParcelHandler gParcelHandler; + // Helper functions static bool is_agent_in_selected_parcel(LLParcel* parcel); static void onSLURLBuilt(std::string& slurl); |