From 2715e94a5ae969956f493609561f0cc144ec2c37 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Wed, 4 Nov 2009 14:33:00 +0200 Subject: Implemented major task EXT-2054 "Hook up parcel permission icons to parcel profile": - Added icon representation of parcel permissions to Place Profile panel. --HG-- branch : product-engine --- indra/newview/llpanelplaceprofile.cpp | 86 ++++++++++++++++++++--------------- 1 file changed, 50 insertions(+), 36 deletions(-) (limited to 'indra/newview/llpanelplaceprofile.cpp') diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 9ba72fe6cf..814139607c 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -84,16 +84,24 @@ BOOL LLPanelPlaceProfile::postBuild() mParcelOwner = getChild("owner_value"); mLastVisited = getChild("last_visited_value"); - mRatingText = getChild("rating_value"); + mParcelRatingIcon = getChild("rating_icon"); + mParcelRatingText = getChild("rating_value"); + mVoiceIcon = getChild("voice_icon"); mVoiceText = getChild("voice_value"); + mFlyIcon = getChild("fly_icon"); mFlyText = getChild("fly_value"); + mPushIcon = getChild("push_icon"); mPushText = getChild("push_value"); + mBuildIcon = getChild("build_icon"); mBuildText = getChild("build_value"); + mScriptsIcon = getChild("scripts_icon"); mScriptsText = getChild("scripts_value"); + mDamageIcon = getChild("damage_icon"); mDamageText = getChild("damage_value"); mRegionNameText = getChild("region_name"); mRegionTypeText = getChild("region_type"); + mRegionRatingIcon = getChild("region_rating_icon"); mRegionRatingText = getChild("region_rating"); mRegionOwnerText = getChild("region_owner"); mRegionGroupText = getChild("region_group"); @@ -128,16 +136,24 @@ void LLPanelPlaceProfile::resetLocation() mParcelOwner->setValue(not_available); mLastVisited->setValue(not_available); - mRatingText->setText(not_available); + mParcelRatingIcon->setValue(not_available); + mParcelRatingText->setText(not_available); + mVoiceIcon->setValue(not_available); mVoiceText->setText(not_available); + mFlyIcon->setValue(not_available); mFlyText->setText(not_available); + mPushIcon->setValue(not_available); mPushText->setText(not_available); + mBuildIcon->setValue(not_available); mBuildText->setText(not_available); - mParcelScriptsText->setText(not_available); + mScriptsIcon->setValue(not_available); + mScriptsText->setText(not_available); + mDamageIcon->setValue(not_available); mDamageText->setText(not_available); mRegionNameText->setValue(not_available); mRegionTypeText->setValue(not_available); + mRegionRatingIcon->setValue(not_available); mRegionRatingText->setValue(not_available); mRegionOwnerText->setValue(not_available); mRegionGroupText->setValue(not_available); @@ -191,33 +207,6 @@ void LLPanelPlaceProfile::setInfoType(INFO_TYPE type) LLPanelPlaceInfo::setInfoType(type); } -// virtual -void LLPanelPlaceProfile::processParcelInfo(const LLParcelData& parcel_data) -{ - LLPanelPlaceInfo::processParcelInfo(parcel_data); - - // HACK: Flag 0x2 == adult region, - // Flag 0x1 == mature region, otherwise assume PG - std::string rating = LLViewerRegion::accessToString(SIM_ACCESS_PG); - if (parcel_data.flags & 0x2) - { - rating = LLViewerRegion::accessToString(SIM_ACCESS_ADULT); - } - else if (parcel_data.flags & 0x1) - { - rating = LLViewerRegion::accessToString(SIM_ACCESS_MATURE); - } - - mMaturityRatingText->setValue(rating); - mRatingText->setValue(rating); - - //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 is_for_sale = (parcel_data.flags & DFQ_FOR_SALE) && - mInfoType == AGENT ? TRUE : FALSE; - mForSalePanel->setVisible(is_for_sale); -} - void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, LLViewerRegion* region, const LLVector3d& pos_global, @@ -238,19 +227,34 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, // HACK: Converting sim access flags to the format // returned by remote parcel response. - switch(region->getSimAccess()) + U8 sim_access = region->getSimAccess(); + switch(sim_access) { case SIM_ACCESS_MATURE: parcel_data.flags = 0x1; + + mParcelRatingIcon->setValue("parcel_drk_M"); + mRegionRatingIcon->setValue("parcel_drk_M"); break; case SIM_ACCESS_ADULT: parcel_data.flags = 0x2; + + mParcelRatingIcon->setValue("parcel_drk_R"); + mRegionRatingIcon->setValue("parcel_drk_R"); break; default: parcel_data.flags = 0; + + mParcelRatingIcon->setValue("parcel_drk_PG"); + mRegionRatingIcon->setValue("parcel_drk_PG"); } + + std::string rating = LLViewerRegion::accessToString(sim_access); + mParcelRatingText->setText(rating); + mRegionRatingText->setText(rating); + parcel_data.desc = parcel->getDesc(); parcel_data.name = parcel->getName(); parcel_data.sim_name = region->getName(); @@ -268,37 +272,45 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, // Processing parcel characteristics if (parcel->getParcelFlagAllowVoice()) { + mVoiceIcon->setValue("parcel_drk_Voice"); mVoiceText->setText(on); } else { + mVoiceIcon->setValue("parcel_drk_VoiceNo"); mVoiceText->setText(off); } if (!region->getBlockFly() && parcel->getAllowFly()) { + mFlyIcon->setValue("parcel_drk_Fly"); mFlyText->setText(on); } else { + mFlyIcon->setValue("parcel_drk_FlyNo"); mFlyText->setText(off); } if (region->getRestrictPushObject() || parcel->getRestrictPushObject()) { + mPushIcon->setValue("parcel_drk_PushNo"); mPushText->setText(off); } else { + mPushIcon->setValue("parcel_drk_Push"); mPushText->setText(on); } if (parcel->getAllowModify()) { + mBuildIcon->setValue("parcel_drk_Build"); mBuildText->setText(on); } else { + mBuildIcon->setValue("parcel_drk_BuildNo"); mBuildText->setText(off); } @@ -306,25 +318,28 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, (region->getRegionFlags() & REGION_FLAGS_ESTATE_SKIP_SCRIPTS) || !parcel->getAllowOtherScripts()) { + mScriptsIcon->setValue("parcel_drk_ScriptsNo"); mScriptsText->setText(off); } else { + mScriptsIcon->setValue("parcel_drk_Scripts"); mScriptsText->setText(on); } if (region->getAllowDamage() || parcel->getAllowDamage()) { + mDamageIcon->setValue("parcel_drk_Damage"); mDamageText->setText(on); } else { + mDamageIcon->setValue("parcel_drk_DamageNo"); mDamageText->setText(off); } mRegionNameText->setText(region->getName()); mRegionTypeText->setText(region->getSimProductName()); - mRegionRatingText->setText(region->getSimAccessString()); // Determine parcel owner if (parcel->isPublic()) @@ -383,9 +398,6 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, &dwell); if (for_sale) { - // Adding "For Sale" flag in remote parcel response format. - parcel_data.flags |= DFQ_FOR_SALE; - const LLUUID& auth_buyer_id = parcel->getAuthorizedBuyerID(); if(auth_buyer_id.notNull()) { @@ -403,6 +415,8 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, mSaleToText->setText(getString("anyone")); } + mForSalePanel->setVisible(for_sale); + const U8* sign = (U8*)getString("price_text").c_str(); const U8* sqm = (U8*)getString("area_text").c_str(); @@ -455,7 +469,7 @@ void LLPanelPlaceProfile::displaySelectedParcelInfo(LLParcel* parcel, mSelectedParcelID = parcel->getLocalID(); mLastSelectedRegionID = region->getRegionID(); - processParcelInfo(parcel_data); + LLPanelPlaceInfo::processParcelInfo(parcel_data); mYouAreHerePanel->setVisible(is_current_parcel); getChild("sales_tab")->setVisible(for_sale); -- cgit v1.3 From 380bb0ce09913ae05000c86fb0a0ed410ead1089 Mon Sep 17 00:00:00 2001 From: Sergei Litovchuk Date: Wed, 4 Nov 2009 15:24:11 +0200 Subject: No ticket. Removed extra includes. Fixed copyright years. --HG-- branch : product-engine --- indra/newview/llpanellandmarkinfo.cpp | 5 +---- indra/newview/llpanellandmarkinfo.h | 2 +- indra/newview/llpanellandmarks.cpp | 2 +- indra/newview/llpanellandmarks.h | 2 +- indra/newview/llpanelpicks.cpp | 2 +- indra/newview/llpanelpicks.h | 2 +- indra/newview/llpanelplaceinfo.cpp | 7 +------ indra/newview/llpanelplaceinfo.h | 2 +- indra/newview/llpanelplaceprofile.cpp | 4 +--- indra/newview/llpanelplaceprofile.h | 2 +- indra/newview/llpanelplaces.cpp | 2 +- indra/newview/llpanelplaces.h | 2 +- indra/newview/llpanelplacestab.cpp | 2 +- indra/newview/llpanelplacestab.h | 2 +- indra/newview/llpanelteleporthistory.cpp | 2 +- indra/newview/llpanelteleporthistory.h | 2 +- 16 files changed, 16 insertions(+), 26 deletions(-) (limited to 'indra/newview/llpanelplaceprofile.cpp') diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp index fd6a41c505..fe01fc6307 100644 --- a/indra/newview/llpanellandmarkinfo.cpp +++ b/indra/newview/llpanellandmarkinfo.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -34,8 +34,6 @@ #include "llpanellandmarkinfo.h" -#include "llinventory.h" - #include "llcombobox.h" #include "lllineeditor.h" #include "lltextbox.h" @@ -44,7 +42,6 @@ #include "llagent.h" #include "llagentui.h" -#include "llinventorymodel.h" #include "lllandmarkactions.h" #include "llviewerinventory.h" #include "llviewerparcelmgr.h" diff --git a/indra/newview/llpanellandmarkinfo.h b/indra/newview/llpanellandmarkinfo.h index 03377986b3..73e0ddb9cc 100644 --- a/indra/newview/llpanellandmarkinfo.h +++ b/indra/newview/llpanellandmarkinfo.h @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab diff --git a/indra/newview/llpanellandmarks.cpp b/indra/newview/llpanellandmarks.cpp index 5f717b51cc..34c146826f 100644 --- a/indra/newview/llpanellandmarks.cpp +++ b/indra/newview/llpanellandmarks.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2001-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h index 0e7abb4865..d54761ed59 100644 --- a/indra/newview/llpanellandmarks.h +++ b/indra/newview/llpanellandmarks.h @@ -5,7 +5,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2001-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab diff --git a/indra/newview/llpanelpicks.cpp b/indra/newview/llpanelpicks.cpp index 6181531f82..2bf04f9681 100644 --- a/indra/newview/llpanelpicks.cpp +++ b/indra/newview/llpanelpicks.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab diff --git a/indra/newview/llpanelpicks.h b/indra/newview/llpanelpicks.h index 06a0f0a0fd..5a2754ad10 100644 --- a/indra/newview/llpanelpicks.h +++ b/indra/newview/llpanelpicks.h @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab diff --git a/indra/newview/llpanelplaceinfo.cpp b/indra/newview/llpanelplaceinfo.cpp index e6d10be858..c600651015 100644 --- a/indra/newview/llpanelplaceinfo.cpp +++ b/indra/newview/llpanelplaceinfo.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -38,8 +38,6 @@ #include "llsdutil.h" #include "llsecondlifeurls.h" -#include "llinventory.h" - #include "llsdutil_math.h" #include "llscrollcontainer.h" @@ -48,15 +46,12 @@ #include "llagent.h" #include "llavatarpropertiesprocessor.h" #include "llexpandabletextbox.h" -#include "llfloaterworldmap.h" -#include "llinventorymodel.h" #include "llpanelpick.h" #include "lltexturectrl.h" #include "llviewerinventory.h" #include "llviewerparcelmgr.h" #include "llviewerregion.h" #include "llviewertexteditor.h" -#include "llworldmap.h" LLPanelPlaceInfo::LLPanelPlaceInfo() : LLPanel(), diff --git a/indra/newview/llpanelplaceinfo.h b/indra/newview/llpanelplaceinfo.h index c9e1347542..ec30397cff 100644 --- a/indra/newview/llpanelplaceinfo.h +++ b/indra/newview/llpanelplaceinfo.h @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab diff --git a/indra/newview/llpanelplaceprofile.cpp b/indra/newview/llpanelplaceprofile.cpp index 814139607c..b2a9f6f251 100644 --- a/indra/newview/llpanelplaceprofile.cpp +++ b/indra/newview/llpanelplaceprofile.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab @@ -36,8 +36,6 @@ #include "llparcel.h" -#include "llqueryflags.h" - #include "lliconctrl.h" #include "lllineeditor.h" #include "lltextbox.h" diff --git a/indra/newview/llpanelplaceprofile.h b/indra/newview/llpanelplaceprofile.h index db54ff8af9..b3ef4acf51 100644 --- a/indra/newview/llpanelplaceprofile.h +++ b/indra/newview/llpanelplaceprofile.h @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab diff --git a/indra/newview/llpanelplaces.cpp b/indra/newview/llpanelplaces.cpp index 42e4a6e40b..6f15e53299 100644 --- a/indra/newview/llpanelplaces.cpp +++ b/indra/newview/llpanelplaces.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab diff --git a/indra/newview/llpanelplaces.h b/indra/newview/llpanelplaces.h index 39eb5261db..8faed613f4 100644 --- a/indra/newview/llpanelplaces.h +++ b/indra/newview/llpanelplaces.h @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab diff --git a/indra/newview/llpanelplacestab.cpp b/indra/newview/llpanelplacestab.cpp index 7c0a7b0cc4..f5e7ff3c40 100644 --- a/indra/newview/llpanelplacestab.cpp +++ b/indra/newview/llpanelplacestab.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab diff --git a/indra/newview/llpanelplacestab.h b/indra/newview/llpanelplacestab.h index 1c70869414..3f56dcb283 100644 --- a/indra/newview/llpanelplacestab.h +++ b/indra/newview/llpanelplacestab.h @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2004-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp index 7dd9df674c..437af1c4e7 100644 --- a/indra/newview/llpanelteleporthistory.cpp +++ b/indra/newview/llpanelteleporthistory.cpp @@ -4,7 +4,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2001-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab diff --git a/indra/newview/llpanelteleporthistory.h b/indra/newview/llpanelteleporthistory.h index 7c1b403432..b34d9e876c 100644 --- a/indra/newview/llpanelteleporthistory.h +++ b/indra/newview/llpanelteleporthistory.h @@ -5,7 +5,7 @@ * * $LicenseInfo:firstyear=2009&license=viewergpl$ * - * Copyright (c) 2001-2009, Linden Research, Inc. + * Copyright (c) 2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab -- cgit v1.3