diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-07-08 05:19:19 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-07-08 05:19:19 +0000 |
commit | f26f7e3e29019abf3a10f6925e30baca19eb4e2d (patch) | |
tree | 071fd0d451b482c9dd8376479b968da4aa099a78 /indra/newview/llpanelplaces.cpp | |
parent | c5d100a9e4595c0d3bc685e0d6a2972ef228013d (diff) |
merge -r 889-936 https://svn.aws.productengine.com/secondlife/pe/stable/ -> viewer-2-0
Also:
* Moved media remote shortcut to Communicate menu
* Changed mini map menu to toggle instead of show
Diffstat (limited to 'indra/newview/llpanelplaces.cpp')
-rw-r--r-- | indra/newview/llpanelplaces.cpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index f23d839708..f5e225c51b 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -80,7 +80,7 @@ BOOL LLPanelPlaces::postBuild() mSearchEditor->setSearchCallback(boost::bind(&LLPanelPlaces::onSearchEdit, this, _1)); } - mPlaceInfo = dynamic_cast<LLPanelPlaceInfo*>(getChild<LLPanel>("panel_landmark_info")); + mPlaceInfo = getChild<LLPanelPlaceInfo>("panel_place_info", TRUE, FALSE); if (mPlaceInfo) { LLButton* back_btn = mPlaceInfo->getChild<LLButton>("back_btn"); @@ -88,6 +88,9 @@ BOOL LLPanelPlaces::postBuild() { back_btn->setClickedCallback(boost::bind(&LLPanelPlaces::onBackButtonClicked, this)); } + + // *TODO: Assign the action to an appropriate event. + childSetAction("overflow_btn", boost::bind(&LLPanelPlaceInfo::toggleMediaPanel, mPlaceInfo), this); } //childSetAction("share_btn", boost::bind(&LLPanelPlaces::onShareButtonClicked, this), this); @@ -109,24 +112,26 @@ void LLPanelPlaces::onOpen(const LLSD& key) togglePlaceInfoPanel(TRUE); - mPlaceInfoType = key["type"].asInteger(); + mPlaceInfoType = key["type"].asString(); - if (mPlaceInfoType == AGENT) + if (mPlaceInfoType == "agent") { // We don't need to teleport to the current location so disable the button getChild<LLButton>("teleport_btn")->setEnabled(FALSE); getChild<LLButton>("map_btn")->setEnabled(TRUE); + mPlaceInfo->setInfoType(LLPanelPlaceInfo::PLACE); mPlaceInfo->displayParcelInfo(gAgent.getPositionAgent(), gAgent.getRegion()->getRegionID(), gAgent.getPositionGlobal()); } - else if (mPlaceInfoType == LANDMARK) + else if (mPlaceInfoType == "landmark") { LLInventoryItem* item = gInventory.getItem(key["id"].asUUID()); if (!item) return; + mPlaceInfo->setInfoType(LLPanelPlaceInfo::LANDMARK); mPlaceInfo->displayItemInfo(item); LLLandmark* landmark = gLandmarkList.getAsset(item->getAssetUUID()); @@ -142,7 +147,7 @@ void LLPanelPlaces::onOpen(const LLSD& key) pos_global); } - else if (mPlaceInfoType == TELEPORT_HISTORY) + else if (mPlaceInfoType == "teleport_history") { S32 index = key["id"].asInteger(); @@ -156,6 +161,7 @@ void LLPanelPlaces::onOpen(const LLSD& key) LLVector3 pos_local(region_x, region_y, (F32)pos_global.mdV[VZ]); + mPlaceInfo->setInfoType(LLPanelPlaceInfo::PLACE); mPlaceInfo->displayParcelInfo(pos_local, hist_items[index].mRegionID, pos_global); @@ -211,7 +217,7 @@ void LLPanelPlaces::onTeleportButtonClicked() void LLPanelPlaces::onShowOnMapButtonClicked() { - if (!mPlaceInfoType) + if (mPlaceInfoType == "agent") { LLVector3d global_pos = gAgent.getPositionGlobal(); if (!global_pos.isExactlyZero()) |