diff options
| author | angela <angela@lindenlab.com> | 2010-03-09 10:04:36 +0800 | 
|---|---|---|
| committer | angela <angela@lindenlab.com> | 2010-03-09 10:04:36 +0800 | 
| commit | 032762fecffb913fd6178965befec62d6b5171e7 (patch) | |
| tree | ce1452c0a61ff0e5e5c82882d6bf972076c40163 | |
| parent | 1788f26b4c8fc91836feba298fd0d38564411341 (diff) | |
EXT-2418 add price to object tooltip
| -rw-r--r-- | indra/newview/lltoolpie.cpp | 20 | ||||
| -rw-r--r-- | indra/newview/skins/default/xui/en/strings.xml | 2 | 
2 files changed, 12 insertions, 10 deletions
| diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 94e43b1e0e..2f4a69a53c 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -901,6 +901,16 @@ 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()); +				tooltip_msg.append(LLTrans::getString("TooltipPrice", args) ); +			} +  			if (nodep->mName.empty())  			{  				tooltip_msg.append(LLTrans::getString("TooltipNoName")); @@ -954,15 +964,7 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l  					}  				}  			} -			 -			// 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()); -				tooltip_msg.append(LLTrans::getString("TooltipPrice", args) ); -			} +  			// Avoid showing tip over media that's displaying unless it's for sale  			// also check the primary node since sometimes it can have an action even though diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 56147cd72b..1eaf77c328 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -77,7 +77,7 @@  	<string name="TooltipMapUrl">Click to view this location on a map</string>  	<string name="TooltipSLAPP">Click to run the secondlife:// command</string>  	<string name="CurrentURL" value=" CurrentURL: [CurrentURL]" />	 -  <string name="TooltipPrice" value="-[PRICE]L$" /> +  <string name="TooltipPrice" value=" L$[PRICE]-" />  	<!-- text for SLURL labels --> | 
