From 8b061ccb37afe4393c66edded4e33fc5e2793eb0 Mon Sep 17 00:00:00 2001
From: McCabe Maxsted
Date: Sun, 26 Apr 2009 11:41:55 -0700
Subject: Backported L$/sq meter info from 1.23

---
 linden/indra/newview/llfloaterbuyland.cpp          | 24 +++++++----
 linden/indra/newview/llfloaterland.cpp             | 46 +++++++++++++---------
 .../skins/default/xui/en-us/floater_about_land.xml | 22 +++++++----
 .../skins/default/xui/en-us/floater_buy_land.xml   | 14 ++++++-
 4 files changed, 70 insertions(+), 36 deletions(-)

(limited to 'linden')

diff --git a/linden/indra/newview/llfloaterbuyland.cpp b/linden/indra/newview/llfloaterbuyland.cpp
index de14129..df0c6bf 100644
--- a/linden/indra/newview/llfloaterbuyland.cpp
+++ b/linden/indra/newview/llfloaterbuyland.cpp
@@ -1020,14 +1020,24 @@ void LLFloaterBuyLandUI::refreshUI()
 		
 			childSetText("info_size", getString("meters_supports_object", string_args));
 
+			F32 cost_per_sqm = 0.0f;
+			if (mParcelActualArea > 0)
+			{
+				cost_per_sqm = (F32)mParcelPrice / (F32)mParcelActualArea;
+			}
 
-			childSetText("info_price",
-				llformat(
-					"L$ %d%s",
-					mParcelPrice,
-					mParcelSoldWithObjects
-						? "\nsold with objects"
-						: ""));
+			LLStringUtil::format_map_t info_price_args;
+			info_price_args["[PRICE]"] = llformat("%d", mParcelPrice);
+			info_price_args["[PRICE_PER_SQM]"] = llformat("%.1f", cost_per_sqm);
+			if (mParcelSoldWithObjects)
+			{
+				info_price_args["[SOLD_WITH_OBJECTS]"] = getString("sold_with_objects");
+			}
+			else
+			{
+				info_price_args["[SOLD_WITH_OBJECTS]"] = getString("sold_without_objects");
+			}
+			childSetText("info_price", getString("info_price_string", info_price_args));
 			childSetVisible("info_price", mParcelIsForSale);
 		}
 		else
diff --git a/linden/indra/newview/llfloaterland.cpp b/linden/indra/newview/llfloaterland.cpp
index 891cde7..74eb172 100644
--- a/linden/indra/newview/llfloaterland.cpp
+++ b/linden/indra/newview/llfloaterland.cpp
@@ -604,6 +604,25 @@ void LLPanelLandGeneral::refresh()
 		mBtnSellLand->setVisible(FALSE);
 		mBtnStopSellLand->setVisible(FALSE);
 		
+		// show pricing information
+		S32 area;
+		S32 claim_price;
+		S32 rent_price;
+		F32 dwell;
+		LLViewerParcelMgr::getInstance()->getDisplayInfo(&area,
+								 &claim_price,
+								 &rent_price,
+								 &for_sale,
+								 &dwell);
+
+		// Area
+		LLUIString price = getString("area_size_text");
+		price.setArg("[AREA]", llformat("%d",area));    
+		mTextPriceLabel->setText(getString("area_text"));
+		mTextPrice->setText(price.getString());
+
+		mTextDwell->setText(llformat("%.0f", dwell));
+
 		if (for_sale)
 		{
 			mSaleInfoForSale1->setVisible(TRUE);
@@ -619,7 +638,15 @@ void LLPanelLandGeneral::refresh()
 				mSaleInfoForSaleNoObjects->setVisible(TRUE);
 			}
 			mSaleInfoNotForSale->setVisible(FALSE);
+
+			F32 cost_per_sqm = 0.0f;
+			if (area > 0)
+			{
+				cost_per_sqm = (F32)parcel->getSalePrice() / (F32)area;
+			}
+
 			mSaleInfoForSale1->setTextArg("[PRICE]", llformat("%d", parcel->getSalePrice()));
+			mSaleInfoForSale1->setTextArg("[PRICE_PER_SQM]", llformat("%.1f", cost_per_sqm));
 			if (can_be_sold)
 			{
 				mBtnStopSellLand->setVisible(TRUE);
@@ -645,25 +672,6 @@ void LLPanelLandGeneral::refresh()
 		mBtnBuyGroupLand->setEnabled(
 			LLViewerParcelMgr::getInstance()->canAgentBuyParcel(parcel, true));
 
-		// show pricing information
-		S32 area;
-		S32 claim_price;
-		S32 rent_price;
-		F32 dwell;
-		LLViewerParcelMgr::getInstance()->getDisplayInfo(&area,
-								   &claim_price,
-								   &rent_price,
-								   &for_sale,
-								   &dwell);
-
-		// Area
-		LLUIString price = getString("area_size_text");
-		price.setArg("[AREA]", llformat("%d",area));	
-		mTextPriceLabel->setText(getString("area_text"));
-		mTextPrice->setText(price.getString());
-		
-		mTextDwell->setText(llformat("%.0f", dwell));
-
 		if(region_owner)
 		{
 			mBtnReclaimLand->setEnabled(
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_about_land.xml b/linden/indra/newview/skins/default/xui/en-us/floater_about_land.xml
index fc1b747..f3fd708 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_about_land.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_about_land.xml
@@ -93,8 +93,8 @@
 			<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
 			     bottom="-180" drop_shadow_visible="true" enabled="true" follows="left|top"
 			     font="SansSerifSmall" h_pad="0" halign="left" height="16" left="76"
-			     mouse_opaque="true" name="For Sale: Price L$[PRICE]." v_pad="0" width="206">
-				Price: L$[PRICE].
+			     mouse_opaque="true" name="For Sale: Price L$[PRICE]." v_pad="0" width="246">
+				Price: L$[PRICE] (L$[PRICE_PER_SQM]/sq.m.).
 			</text>
 			<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
 			     bottom="-200" drop_shadow_visible="true" enabled="false" follows="left|top"
@@ -467,7 +467,7 @@ Go to World menu > About Land or select another parcel to show its details.
 				<column name="online_status" width="-1" />
 				<column name="name" dynamicwidth="true" label="Name" />
 				<column name="count" label="Count" width="70" />
-				<column label="Most Recent" width="160" />
+				<column name="mostrecent" label="Most Recent" width="160" />
 			</name_list>
 		</panel>
 		<panel border="true" bottom="-349" enabled="true" follows="left|top|right|bottom"
@@ -481,13 +481,17 @@ Go to World menu > About Land or select another parcel to show its details.
 			</text>
 			<check_box bottom="-40" enabled="true" follows="left|top" font="SansSerifSmall"
 			     height="16" initial_value="false" label="Edit Terrain" left="14"
-			     mouse_opaque="true" name="edit land check" radio_style="false" width="268" />
+			     mouse_opaque="true" name="edit land check" radio_style="false"
+                             tool_tip="If checked, anyone can terraform your land. It is best to leave this unchecked, as you can always edit your own land."
+                             width="268" />
 			<check_box bottom="-60" enabled="true" follows="left|top" font="SansSerifSmall"
 			     height="16" initial_value="false" label="Create Landmarks" left="14"
 			     mouse_opaque="true" name="check landmark" radio_style="false" width="268" />
 			<check_box bottom="-80" enabled="true" follows="left|top" font="SansSerifSmall"
 			     height="16" initial_value="false" label="Fly" left="14" mouse_opaque="true"
-			     name="check fly" radio_style="false" width="268" />
+			     name="check fly" radio_style="false"
+                             tool_tip="If checked, Residents can fly on your land. If unchecked, they can only fly into and over your land."
+                             width="268" />
 			<text type="string" length="1" bg_visible="false" border_drop_shadow_visible="false" border_visible="false"
 			     bottom="-40" drop_shadow_visible="true" enabled="true" follows="left|top"
 			     font="SansSerifSmall" h_pad="0" halign="left" height="16" left="178"
@@ -538,11 +542,13 @@ Go to World menu > About Land or select another parcel to show its details.
 			</text>
 			<check_box bottom="-120" enabled="true" follows="left|top" font="SansSerifSmall"
 			     height="16" initial_value="false" label="Safe (no damage)" left="14"
-			     mouse_opaque="true" name="check safe" radio_style="false" width="268" />
+			     mouse_opaque="true" name="check safe" radio_style="false"
+                             tool_tip="If checked, sets the land to Safe, disabling damage combat. If cleared, damage combat is enabled."
+                             width="268" />
 			<check_box bottom="-120" enabled="true" follows="left|top" font="SansSerifSmall"
 			     height="16" initial_value="false" label="Restrict Pushing" left="178"
 			     mouse_opaque="true" name="PushRestrictCheck" radio_style="false"
-			     tool_tip="llPushObject will only work through parcel owner scripts or on scripts where the pushee is the script owner."
+			     tool_tip="Prevents scripts from pushing. Checking this option may be useful for preventing disruptive behavior on your land."
 			     width="119" />
 			<check_box bottom="-140" enabled="true" follows="left|top" font="SansSerifSmall"
 			     height="16" initial_value="false"
@@ -622,7 +628,7 @@ Go to World menu > About Land or select another parcel to show its details.
 			<button bottom="-303" enabled="true" follows="left|top" font="SansSerifSmall"
 			     halign="center" height="16" label="Set" label_selected="Set" left="236"
 			     mouse_opaque="true" name="Set" scale_image="true"
-			     tool_tip="Set the landing point to your avatar&apos;s location. It must be inside this land parcel."
+			     tool_tip="Sets the landing point where visitors arrive. Sets to your avatar&apos;s location inside this parcel."
 			     width="50" />
 			<button bottom="-303" enabled="true" follows="left|top" font="SansSerifSmall"
 			     halign="center" height="16" label="Clear" label_selected="Clear" left="291"
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_buy_land.xml b/linden/indra/newview/skins/default/xui/en-us/floater_buy_land.xml
index a7fd3ed..a0c82f9 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_buy_land.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_buy_land.xml
@@ -86,13 +86,15 @@
 	</text>
 	<text bottom_delta="-5" follows="top|left" font="SansSerif" height="16" left_delta="50"
 	     name="info_price" right="400" >
-		L$ 1500, objects included
+		L$ 1500
+		(L$ 1.1/sq.m.)
+		sold with objects
 	</text>
 	<text bottom="-180" follows="top|left" font="SansSerifHuge" height="24" left="16"
 	     name="info_action" width="200">
 		Buying this land will:
 	</text>
-	<pad height="10" />
+	<pad height="6" />
 	<icon follows="top|left" height="64" image_name="badge_note.j2c" left="0"
 	     name="step_error" width="64" />
 	<text bottom_delta="-110" follows="top|left" height="160" left="72"
@@ -267,6 +269,14 @@ supports [AMOUNT2] objects
 	<string name="sold_with_objects">
 		sold with objects
 	</string>
+	<string name="sold_without_objects">
+		objects not included
+	</string>
+	<string name="info_price_string">
+		L$ [PRICE]
+(L$ [PRICE_PER_SQM]/sq.m.)
+[SOLD_WITH_OBJECTS]
+	</string>
 	<string name="insufficient_land_credits">
 		The group [GROUP] will need sufficient contributed land use 
 credits to cover this parcel before the purchase will 
-- 
cgit v1.1