summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolpie.cpp
diff options
context:
space:
mode:
authorAimee Linden <aimee@lindenlab.com>2010-07-09 02:49:10 +0100
committerAimee Linden <aimee@lindenlab.com>2010-07-09 02:49:10 +0100
commit9ba22cee0e8c6d73bee33689553e5371a2ef0942 (patch)
tree593b41b84a31bd36abdb33c1a0cc8fbd7625bf98 /indra/newview/lltoolpie.cpp
parentadfa188ceea432edf889d50e2c86bbc9ead9c71d (diff)
EXT-8296 FIXED Format currency properly in tooltips and the about land window.
Diffstat (limited to 'indra/newview/lltoolpie.cpp')
-rw-r--r--indra/newview/lltoolpie.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index ae244cd8a1..95c4f01e46 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -53,6 +53,7 @@
#include "llmediaentry.h"
#include "llmenugl.h"
#include "llmutelist.h"
+#include "llresmgr.h" // getMonetaryString
#include "llselectmgr.h"
#include "lltoolfocus.h"
#include "lltoolgrab.h"
@@ -808,7 +809,8 @@ BOOL LLToolPie::handleTooltipLand(std::string line, std::string tooltip_msg)
if (hover_parcel && hover_parcel->getParcelFlag(PF_FOR_SALE))
{
LLStringUtil::format_map_t args;
- args["[AMOUNT]"] = llformat("%d", hover_parcel->getSalePrice());
+ S32 price = hover_parcel->getSalePrice();
+ args["[AMOUNT]"] = LLResMgr::getInstance()->getMonetaryString(price);
line = LLTrans::getString("TooltipForSaleL$", args);
tooltip_msg.append(line);
tooltip_msg.push_back('\n');
@@ -906,13 +908,14 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
|| !existing_inspector->getVisible()
|| existing_inspector->getKey()["object_id"].asUUID() != hover_object->getID()))
{
-
+
// Add price to tooltip for items on sale
bool for_sale = for_sale_selection(nodep);
if(for_sale)
{
LLStringUtil::format_map_t args;
- args["[PRICE]"] = llformat ("%d", nodep->mSaleInfo.getSalePrice());
+ S32 price = nodep->mSaleInfo.getSalePrice();
+ args["[AMOUNT]"] = LLResMgr::getInstance()->getMonetaryString(price);
tooltip_msg.append(LLTrans::getString("TooltipPrice", args) );
}