Commits

Anonymous committed d26ed31

Revert code fo ER-1016 - "Remove ability for anyone to edit terrain"
and muck with the "About Land" Options tab one more time.

Comments (0)

Files changed (3)

indra/newview/llfloaterland.cpp

 	mCheckEditGroupObjects(NULL),
 	mCheckAllObjectEntry(NULL),
 	mCheckGroupObjectEntry(NULL),
+	mCheckEditLand(NULL),
 	mCheckSafe(NULL),
 	mCheckFly(NULL),
 	mCheckGroupScripts(NULL),
 	mCheckGroupObjectEntry = getChild<LLCheckBoxCtrl>( "group object entry check");
 	childSetCommitCallback("group object entry check", onCommitAny, this);
 	
-//	mCheckEditLand = getChild<LLCheckBoxCtrl>( "edit land check");
-//	childSetCommitCallback("edit land check", onCommitAny, this);
+	mCheckEditLand = getChild<LLCheckBoxCtrl>( "edit land check");
+	childSetCommitCallback("edit land check", onCommitAny, this);
 
 	
 	mCheckGroupScripts = getChild<LLCheckBoxCtrl>( "check group scripts");
 		mCheckGroupObjectEntry	->set(FALSE);
 		mCheckGroupObjectEntry	->setEnabled(FALSE);
 
+		mCheckEditLand		->set(FALSE);
+		mCheckEditLand		->setEnabled(FALSE);
+		
 		mCheckSafe			->set(FALSE);
 		mCheckSafe			->setEnabled(FALSE);
 
 		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 );
 
 	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
 	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);

indra/newview/llfloaterland.h

 	LLCheckBoxCtrl*	mCheckEditGroupObjects;
 	LLCheckBoxCtrl*	mCheckAllObjectEntry;
 	LLCheckBoxCtrl*	mCheckGroupObjectEntry;
+	LLCheckBoxCtrl*	mCheckEditLand;
 	LLCheckBoxCtrl*	mCheckSafe;
 	LLCheckBoxCtrl*	mCheckFly;
 	LLCheckBoxCtrl*	mCheckGroupScripts;

indra/newview/skins/default/xui/en/floater_about_land.xml

             </panel.string>
             <panel.string
              name="see_avs_text">
-                See and chat with avatars on this parcel
+                 Allow avatars on other parcels to see
+ and chat with avatars on this parcel
             </panel.string>
             <text
              type="string"
              left="10"
              name="allow_label"
              top="10"
-             width="270">
+             width="278">
                 Allow other Residents to:
             </text>
             <check_box
              height="16"
+             label="Edit Terrain"
+             layout="topleft"
+             left="14"
+             name="edit land check"
+             tool_tip="If checked, anyone can terraform your land. It is best to leave this unchecked, as you can always edit your own land."
+             top_pad="4"
+             width="147i" />
+            <check_box
+             height="16"
              label="Fly"
              layout="topleft"
              name="check fly"
              tool_tip="If checked, Residents can fly on your land. If unchecked, they can only fly into and over your land."
              left_pad="4"
-             width="128" />
+             width="150" />
             <text
              type="string"
              length="1"
              name="check group scripts"
              top_delta="0"
              width="70" />
-          <check_box
-             height="16"
-             label="See Avatars"
-             layout="topleft"
-             left="14"
-             name="SeeAvatarsCheck"
-             tool_tip="Allow avatars on other parcels to see and chat with avatars on this parcel."
-             top_pad="5"
-             width="119" />
            <text
              type="string"
              text_color="white"
              name="check safe"
              tool_tip="If checked, sets the land to Safe, disabling damage combat. If cleared, damage combat is enabled."
              top_pad="5"
-             width="280" />
+             width="200" />
             <check_box
              height="16"
              label="No Pushing"
              left="14"
              name="ShowDirectoryCheck"
              tool_tip="Let people see this parcel in search results"
-             width="280" />
+             width="430" />
             <combo_box
              enabled="false"
              height="23"
              fallback_image="default_land_picture.j2c" 
              tool_tip="Click to choose a picture"
              width="195" />
+            <check_box
+             height="32"
+             label="See Avatars"
+             layout="topleft"
+             left="230"
+             top="164"
+             name="SeeAvatarsCheck"
+             tool_tip="Allows avatars on other parcels to see and chat with avatars on this parcel, and you to see and chat with them."
+             width="120" />
             <text
              type="string"
              length="1"
              follows="left|top"
              height="16"
              layout="topleft"
-             left="220"
-             top="180"
+             left="230"
+             top="230"
              text_color="white"
              name="landing_point"
              word_wrap="true"
              label_selected="Set"
              layout="topleft"
              name="Set"
-             right="-68"
+             left="230"
              tool_tip="Sets the landing point where visitors arrive. Sets to your avatar&apos;s location inside this parcel."
              width="50" />
             <button
              left_pad="5"
              name="Clear"
              tool_tip="Clear the landing point"
-             right="-10"
              width="55" />
             <text
              type="string"
              follows="left|top"
              height="16"
              layout="topleft"
-             left="220"
+             left="230"
              top_pad="10"
              name="Teleport Routing: "
              width="200">