summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorangela <angela@lindenlab.com>2010-03-11 14:07:03 +0800
committerangela <angela@lindenlab.com>2010-03-11 14:07:03 +0800
commita618a3913af506878adf59a2c5b5fb12e665e35b (patch)
tree6316c2869fa927f3d75742a49ba76823528e0d2d /indra/newview
parentdc44d2dc1aec9661273abc7c2d78d290369c21cd (diff)
parente48f56fefc504c943a2b049731594f499d37f253 (diff)
Automated merge with ssh://angela@hg.lindenlab.com/viewer/viewer-2-0/
Diffstat (limited to 'indra/newview')
-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>