From f5bd2109c27b098dd73a9578f1f032b6ff9e4c2d Mon Sep 17 00:00:00 2001 From: "simon@lindenlab.com" Date: Thu, 7 Jul 2011 17:42:54 -0700 Subject: Revert code fo ER-1016 - "Remove ability for anyone to edit terrain" and muck with the "About Land" Options tab one more time. --- indra/newview/llfloaterland.cpp | 15 +++++-- indra/newview/llfloaterland.h | 1 + .../skins/default/xui/en/floater_about_land.xml | 47 +++++++++++++--------- 3 files changed, 41 insertions(+), 22 deletions(-) diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 45d215664e..b373a6afa0 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -1804,6 +1804,7 @@ LLPanelLandOptions::LLPanelLandOptions(LLParcelSelectionHandle& parcel) mCheckEditGroupObjects(NULL), mCheckAllObjectEntry(NULL), mCheckGroupObjectEntry(NULL), + mCheckEditLand(NULL), mCheckSafe(NULL), mCheckFly(NULL), mCheckGroupScripts(NULL), @@ -1837,8 +1838,8 @@ BOOL LLPanelLandOptions::postBuild() mCheckGroupObjectEntry = getChild( "group object entry check"); childSetCommitCallback("group object entry check", onCommitAny, this); -// mCheckEditLand = getChild( "edit land check"); -// childSetCommitCallback("edit land check", onCommitAny, this); + mCheckEditLand = getChild( "edit land check"); + childSetCommitCallback("edit land check", onCommitAny, this); mCheckGroupScripts = getChild( "check group scripts"); @@ -1953,6 +1954,9 @@ void LLPanelLandOptions::refresh() mCheckGroupObjectEntry ->set(FALSE); mCheckGroupObjectEntry ->setEnabled(FALSE); + mCheckEditLand ->set(FALSE); + mCheckEditLand ->setEnabled(FALSE); + mCheckSafe ->set(FALSE); mCheckSafe ->setEnabled(FALSE); @@ -2001,6 +2005,10 @@ void LLPanelLandOptions::refresh() mCheckGroupObjectEntry ->set( parcel->getAllowGroupObjectEntry() || parcel->getAllowAllObjectEntry()); mCheckGroupObjectEntry ->setEnabled( can_change_options && !parcel->getAllowAllObjectEntry() ); + BOOL can_change_terraform = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_EDIT); + mCheckEditLand ->set( parcel->getAllowTerraform() ); + mCheckEditLand ->setEnabled( can_change_terraform ); + mCheckSafe ->set( !parcel->getAllowDamage() ); mCheckSafe ->setEnabled( can_change_options ); @@ -2225,6 +2233,7 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata) BOOL create_group_objects = self->mCheckEditGroupObjects->get() || self->mCheckEditObjects->get(); BOOL all_object_entry = self->mCheckAllObjectEntry->get(); BOOL group_object_entry = self->mCheckGroupObjectEntry->get() || self->mCheckAllObjectEntry->get(); + BOOL allow_terraform = self->mCheckEditLand->get(); BOOL allow_damage = !self->mCheckSafe->get(); BOOL allow_fly = self->mCheckFly->get(); BOOL allow_landmark = TRUE; // cannot restrict landmark creation @@ -2254,7 +2263,7 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata) parcel->setParcelFlag(PF_CREATE_GROUP_OBJECTS, create_group_objects); parcel->setParcelFlag(PF_ALLOW_ALL_OBJECT_ENTRY, all_object_entry); parcel->setParcelFlag(PF_ALLOW_GROUP_OBJECT_ENTRY, group_object_entry); - parcel->setParcelFlag(PF_ALLOW_TERRAFORM, FALSE); // was allow_terraform + parcel->setParcelFlag(PF_ALLOW_TERRAFORM, allow_terraform); parcel->setParcelFlag(PF_ALLOW_DAMAGE, allow_damage); parcel->setParcelFlag(PF_ALLOW_FLY, allow_fly); parcel->setParcelFlag(PF_ALLOW_LANDMARK, allow_landmark); diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h index 4f1c10274a..6fceca1acd 100644 --- a/indra/newview/llfloaterland.h +++ b/indra/newview/llfloaterland.h @@ -330,6 +330,7 @@ private: LLCheckBoxCtrl* mCheckEditGroupObjects; LLCheckBoxCtrl* mCheckAllObjectEntry; LLCheckBoxCtrl* mCheckGroupObjectEntry; + LLCheckBoxCtrl* mCheckEditLand; LLCheckBoxCtrl* mCheckSafe; LLCheckBoxCtrl* mCheckFly; LLCheckBoxCtrl* mCheckGroupScripts; diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index ac186d7737..df6a9d82e2 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -1206,7 +1206,8 @@ Only large parcels can be listed in search. - See and chat with avatars on this parcel + Allow avatars on other parcels to see + and chat with avatars on this parcel + width="278"> Allow other Residents to: + + width="150" /> - + width="200" /> + width="430" /> +