summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorangela <angela@lindenlab.com>2010-03-08 16:17:47 +0800
committerangela <angela@lindenlab.com>2010-03-08 16:17:47 +0800
commit1788f26b4c8fc91836feba298fd0d38564411341 (patch)
tree97653b0024f5d74b3e03a23ffdb5ef8563c29499 /indra
parent93051dc23cb3252af327a9b113abc45de154ff4e (diff)
EXT-2418 Object hover tips no longer show price, description or owner
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lltoolpie.cpp23
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml4
2 files changed, 20 insertions, 7 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index fb78b6a415..94e43b1e0e 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -931,7 +931,7 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
if (media_impl.notNull() && (media_impl->hasMedia()))
{
is_media_displaying = true;
- LLStringUtil::format_map_t args;
+ //LLStringUtil::format_map_t args;
media_plugin = media_impl->getMediaPlugin();
if(media_plugin)
@@ -955,13 +955,24 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
}
}
- // Avoid showing tip over media that's displaying
+ // 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
// the root node doesn't
- bool needs_tip = !is_media_displaying &&
- (has_media ||
- needs_tooltip(nodep) ||
- needs_tooltip(LLSelectMgr::getInstance()->getPrimaryHoverNode()));
+
+ bool needs_tip = (!is_media_displaying ||
+ for_sale) &&
+ (has_media ||
+ needs_tooltip(nodep) ||
+ needs_tooltip(LLSelectMgr::getInstance()->getPrimaryHoverNode()));
if (show_all_object_tips || needs_tip)
{
diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml
index 59c54f0cad..56147cd72b 100644
--- a/indra/newview/skins/default/xui/en/strings.xml
+++ b/indra/newview/skins/default/xui/en/strings.xml
@@ -76,7 +76,9 @@
<string name="TooltipObjectIMUrl">Click to view this object's description</string>
<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="CurrentURL" value=" CurrentURL: [CurrentURL]" />
+ <string name="TooltipPrice" value="-[PRICE]L$" />
+
<!-- text for SLURL labels -->
<string name="SLurlLabelTeleport">Teleport to</string>