summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelplaces.cpp
diff options
context:
space:
mode:
authorAimee Linden <aimee@lindenlab.com>2010-07-19 13:23:19 +0100
committerAimee Linden <aimee@lindenlab.com>2010-07-19 13:23:19 +0100
commite48e1e32d8543fb930f45b7eb98e28ce17cd29b8 (patch)
tree8504a16dfc803ba8673737076a46d7fc5d15c981 /indra/newview/llpanelplaces.cpp
parentbfdfff3f0743550a8f8b42e8959df909c200a073 (diff)
Bury the dead code day: Removed LLFloaterParcelInfo, LLFloaterURLDisplay and LLPanelPlace
Moved LLParcelHandler from now defunct llfloaterparcel.cpp to llpanelplaces.cpp
Diffstat (limited to 'indra/newview/llpanelplaces.cpp')
-rw-r--r--indra/newview/llpanelplaces.cpp37
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);