From e1d8dac25a93db837c780428a23f81cbf9109270 Mon Sep 17 00:00:00 2001 From: Melinda Green Date: Mon, 15 Dec 2008 21:21:19 +0000 Subject: svn merge -r105329:105903 svn+ssh://svn/svn/linden/branches/featurettes/featurettes-batch4-merge Resolving QAR-1051 Merge featurettes batch #4 --- indra/newview/llfloaterbuyland.cpp | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'indra/newview/llfloaterbuyland.cpp') 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 -- cgit v1.2.3