diff options
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); } |