diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-07-30 23:22:41 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-07-30 23:22:41 +0000 |
commit | e97f7728a90dd66014f6b3f0cd5e8d4c71f48691 (patch) | |
tree | 4be178df6b50a3395105cdd3ac0044d6467a9fa3 /indra/newview/llurldispatcher.cpp | |
parent | d5aa10143a0e6457b3326ba839c81b7c956a015e (diff) |
merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0/indra@1170 https://svn.aws.productengine.com/secondlife/pe/stable-1/indra@1187 -> viewer-2.0.0-3
Diffstat (limited to 'indra/newview/llurldispatcher.cpp')
-rw-r--r-- | indra/newview/llurldispatcher.cpp | 47 |
1 files changed, 29 insertions, 18 deletions
diff --git a/indra/newview/llurldispatcher.cpp b/indra/newview/llurldispatcher.cpp index acb7f927b6..9fb6d1c874 100644 --- a/indra/newview/llurldispatcher.cpp +++ b/indra/newview/llurldispatcher.cpp @@ -43,6 +43,7 @@ #include "llfloaterurldisplay.h" #include "llfloaterworldmap.h" #include "llpanellogin.h" +#include "llsidetray.h" #include "llslurl.h" #include "llstartup.h" // gStartupState #include "llurlsimstring.h" @@ -202,8 +203,9 @@ bool LLURLDispatcherImpl::dispatchRegion(const std::string& url, bool right_mous S32 z = 0; LLURLSimString::parse(sim_string, ®ion_name, &x, &y, &z); - LLFloaterURLDisplay* url_displayp = LLFloaterReg::getTypedInstance<LLFloaterURLDisplay>("preview_url",LLSD()); - if(url_displayp) url_displayp->setName(region_name); + // LLFloaterURLDisplay functionality moved to LLPanelPlaces in Side Tray. + //LLFloaterURLDisplay* url_displayp = LLFloaterReg::getTypedInstance<LLFloaterURLDisplay>("preview_url",LLSD()); + //if(url_displayp) url_displayp->setName(region_name); // Request a region handle by name LLWorldMap::getInstance()->sendNamedRegionRequest(region_name, @@ -274,12 +276,11 @@ void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const std::str local_pos.mV[VY] = (F32)local_y; local_pos.mV[VZ] = (F32)z; - + LLVector3d global_pos = from_region_handle(region_handle); + global_pos += LLVector3d(local_pos); if (teleport) - { - LLVector3d global_pos = from_region_handle(region_handle); - global_pos += LLVector3d(local_pos); + { gAgent.teleportViaLocation(global_pos); LLFloaterWorldMap* instance = LLFloaterWorldMap::getInstance(); if(instance) @@ -289,18 +290,28 @@ void LLURLDispatcherImpl::regionHandleCallback(U64 region_handle, const std::str } else { - // display informational floater, allow user to click teleport btn - LLFloaterURLDisplay* url_displayp = LLFloaterReg::getTypedInstance<LLFloaterURLDisplay>("preview_url",LLSD()); - if(url_displayp) - { - url_displayp->displayParcelInfo(region_handle, local_pos); - if(snapshot_id.notNull()) - { - url_displayp->setSnapshotDisplay(snapshot_id); - } - std::string locationString = llformat("%s %d, %d, %d", region_name.c_str(), x, y, z); - url_displayp->setLocationString(locationString); - } + LLSD key; + key["type"] = "remote_place"; + key["x"] = global_pos.mdV[VX]; + key["y"] = global_pos.mdV[VY]; + key["z"] = global_pos.mdV[VZ]; + + LLSideTray::getInstance()->showPanel("panel_places", key); + + // LLFloaterURLDisplay functionality moved to LLPanelPlaces in Side Tray. + +// // display informational floater, allow user to click teleport btn +// LLFloaterURLDisplay* url_displayp = LLFloaterReg::getTypedInstance<LLFloaterURLDisplay>("preview_url",LLSD()); +// if(url_displayp) +// { +// url_displayp->displayParcelInfo(region_handle, local_pos); +// if(snapshot_id.notNull()) +// { +// url_displayp->setSnapshotDisplay(snapshot_id); +// } +// std::string locationString = llformat("%s %d, %d, %d", region_name.c_str(), x, y, z); +// url_displayp->setLocationString(locationString); +// } } } |