summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterbuyland.cpp
diff options
context:
space:
mode:
authorMelinda Green <melinda@lindenlab.com>2008-12-15 21:21:19 +0000
committerMelinda Green <melinda@lindenlab.com>2008-12-15 21:21:19 +0000
commite1d8dac25a93db837c780428a23f81cbf9109270 (patch)
treea0bcaec0cec1ba6b3ce813764650eada61fcde4f /indra/newview/llfloaterbuyland.cpp
parent9c0dbb123376608e464fcd8d1a2e288e01d78a3f (diff)
svn merge -r105329:105903 svn+ssh://svn/svn/linden/branches/featurettes/featurettes-batch4-merge
Resolving QAR-1051 Merge featurettes batch #4
Diffstat (limited to 'indra/newview/llfloaterbuyland.cpp')
-rw-r--r--indra/newview/llfloaterbuyland.cpp24
1 files changed, 17 insertions, 7 deletions
diff --git a/indra/newview/llfloaterbuyland.cpp b/indra/newview/llfloaterbuyland.cpp
index b08dea248f..7aa6af2fea 100644
--- a/indra/newview/llfloaterbuyland.cpp
+++ b/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