diff options
author | Steven Bennetts <steve@lindenlab.com> | 2009-08-26 20:47:27 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2009-08-26 20:47:27 +0000 |
commit | af98aad98d43ec8b128ecac3089426d6ae6edc3f (patch) | |
tree | 5971f87afc04580df470a003793dcc8c974e29a7 /indra/newview/llpanelplaceinfo.cpp | |
parent | 6a364e6f32c12c1ab2c0f33e8ef07d885a8765a2 (diff) |
svn merge https://svn.aws.productengine.com/secondlife/export-from-ll/viewer-2-0@1471 https://svn.aws.productengine.com/secondlife/pe/stable-1@1476 -> viewer-2.0.0-3
EXT-65 EXT-270 EXT-359 EXT-361 EXT-367 EXT-367 EXT-368 EXT-455 EXT-468 EXT-530 EXT-539 EXT-540 EXT-542 EXT-545 EXT-555 EXT-557 EXT-558 EXT-559 EXT-559 EXT-560 EXT-561 EXT-562 EXT-563 EXT-564 EXT-566 EXT-568 EXT-569 EXT-570 EXT-571 EXT-581 EXT-590 EXT-594 EXT-596 EXT-597 EXT-601 EXT-602 EXT-603 EXT-613 EXT-620 EXT-624 EXT-628 EXT-630 EXT-631 EXT-632 EXT-639 EXT-640 EXT-641 EXT-642 EXT-662 EXT-671 EXT-672 EXT-676 EXT-682 EXT-692 EXT-703 EXT-717
Diffstat (limited to 'indra/newview/llpanelplaceinfo.cpp')
-rw-r--r-- | indra/newview/llpanelplaceinfo.cpp | 51 |
1 files changed, 44 insertions, 7 deletions
diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index c8e0a53764..a01977c9b5 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -98,6 +98,10 @@ BOOL LLPanelPlaceInfo::postBuild() mDescEditor = getChild<LLTextEditor>("description"); mRating = getChild<LLIconCtrl>("maturity"); + mRegionInfoDrillIn = getChild<LLButton>("region_info_drill_in"); + mMediaDrillIn = getChild<LLButton>("media_drill_in"); + mMediaDrillIn->setClickedCallback(boost::bind(&LLPanelPlaceInfo::toggleMediaPanel, this, TRUE)); + mOwner = getChild<LLTextBox>("owner"); mCreator = getChild<LLTextBox>("creator"); mCreated = getChild<LLTextBox>("created"); @@ -241,13 +245,18 @@ void LLPanelPlaceInfo::setParcelID(const LLUUID& parcel_id) } void LLPanelPlaceInfo::setInfoType(INFO_TYPE type) -{ - bool is_landmark_info_type = type == LANDMARK; +{ LLPanel* landmark_info_panel = getChild<LLPanel>("landmark_info_panel"); - if (landmark_info_panel) - { - landmark_info_panel->setVisible(is_landmark_info_type); - } + LLPanel* landmark_edit_panel = getChild<LLPanel>("landmark_edit_panel"); + + bool is_info_type_agent = type == AGENT; + bool is_info_type_landmark = type == LANDMARK; + + landmark_info_panel->setVisible(is_info_type_landmark); + landmark_edit_panel->setVisible(is_info_type_landmark || type == CREATE_LANDMARK); + + mRegionInfoDrillIn->setVisible(is_info_type_agent); + mMediaDrillIn->setVisible(is_info_type_agent); switch(type) { @@ -255,6 +264,7 @@ void LLPanelPlaceInfo::setInfoType(INFO_TYPE type) mCurrentTitle = getString("title_create_landmark"); break; + case AGENT: case PLACE: mCurrentTitle = getString("title_place"); @@ -366,6 +376,11 @@ void LLPanelPlaceInfo::processParcelInfo(const LLParcelData& parcel_data) } mRating->setValue(rating_icon); + //update for_sale banner, here we should use DFQ_FOR_SALE instead of PF_FOR_SALE + //because we deal with remote parcel response format + bool isForSale = (parcel_data.flags & DFQ_FOR_SALE)? TRUE : FALSE; + getChild<LLIconCtrl>("icon_for_sale")->setVisible(isForSale); + // Just use given region position for display S32 region_x = llround(mPosRegion.mV[0]); S32 region_y = llround(mPosRegion.mV[1]); @@ -436,8 +451,28 @@ void LLPanelPlaceInfo::displayAgentParcelInfo() return; LLParcelData parcel_data; + + // HACK: Converting sim access flags to the format + // returned by remote parcel response. + switch(region->getSimAccess()) + { + case SIM_ACCESS_MATURE: + parcel_data.flags = 0x1; + + case SIM_ACCESS_ADULT: + parcel_data.flags = 0x2; + + default: + parcel_data.flags = 0; + } + + // Adding "For Sale" flag in remote parcel response format. + if (parcel->getForSale()) + { + parcel_data.flags |= DFQ_FOR_SALE; + } + parcel_data.desc = parcel->getDesc(); - parcel_data.flags = region->getSimAccess(); parcel_data.name = parcel->getName(); parcel_data.sim_name = gAgent.getRegion()->getName(); parcel_data.snapshot_id = parcel->getSnapshotID(); @@ -446,6 +481,8 @@ void LLPanelPlaceInfo::displayAgentParcelInfo() parcel_data.global_y = global_pos.mdV[1]; parcel_data.global_z = global_pos.mdV[2]; + + processParcelInfo(parcel_data); } |