summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorangela <angela@lindenlab.com>2010-03-11 10:21:50 +0800
committerangela <angela@lindenlab.com>2010-03-11 10:21:50 +0800
commite48f56fefc504c943a2b049731594f499d37f253 (patch)
tree1d59b776fcb7a12801e6f2b86e99fcd0820df544 /indra
parent575fff1e4dd2769feff56bf3d521cdefc64b89cc (diff)
parent032762fecffb913fd6178965befec62d6b5171e7 (diff)
merge from repo
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lltoolpie.cpp27
-rw-r--r--indra/newview/skins/default/xui/en/strings.xml4
2 files changed, 23 insertions, 8 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index fb78b6a415..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"));
@@ -931,7 +941,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)
@@ -954,14 +964,17 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l
}
}
}
-
- // Avoid showing tip over media that's displaying
+
+
+ // 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..1eaf77c328 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=" L$[PRICE]-" />
+
<!-- text for SLURL labels -->
<string name="SLurlLabelTeleport">Teleport to</string>