diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 01240edd80..9fb14968ae 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -578,11 +578,29 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask ) // If the cursor is near an avatar on the minimap, a mini-inspector will be // shown for the avatar, instead of the normal map tooltip. - if (handleToolTipAgent(mClosestAgentToCursor)) +// if (handleToolTipAgent(mClosestAgentToCursor)) +// [RLVa:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a + if ( (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && (handleToolTipAgent(mClosestAgentToCursor)) ) +// [/RLVa:KB] { return TRUE; } +// [RLVa:KB] - Checked: 2010-10-31 (RLVa-1.2.2a) | Modified: RLVa-1.2.2a + LLStringUtil::format_map_t args; + + LLAvatarName avName; + if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) && + (mClosestAgentToCursor.notNull()) && (LLAvatarNameCache::get(mClosestAgentToCursor, &avName)) ) + { + args["[AGENT]"] = RlvStrings::getAnonym(avName) + "\n"; + } + else + { + args["[AGENT]"] = ""; + } +// [/RLVa:KB] + LLRect sticky_rect; std::string region_name; LLViewerRegion* region = LLWorld::getInstance()->getRegionFromPosGlobal( viewPosToGlobal( x, y ) ); @@ -601,7 +619,7 @@ BOOL LLNetMap::handleToolTip( S32 x, S32 y, MASK mask ) } } - LLStringUtil::format_map_t args; +// LLStringUtil::format_map_t args; args["[REGION]"] = region_name; std::string msg = mToolTipMsg; LLStringUtil::format(msg, args); diff --git a/indra/newview/rlvcommon.h b/indra/newview/rlvcommon.h index 278cd710e8..29d6742ba8 100644 --- a/indra/newview/rlvcommon.h +++ b/indra/newview/rlvcommon.h @@ -17,6 +17,7 @@ #ifndef RLV_COMMON_H #define RLV_COMMON_H +#include "llavatarname.h" #include "llinventorymodel.h" #include "llselectmgr.h" #include "llviewercontrol.h" @@ -97,6 +98,7 @@ class RlvStrings public: static void initClass(); + static const std::string& getAnonym(const LLAvatarName& avName); // @shownames static const std::string& getAnonym(const std::string& strName); // @shownames static const std::string& getBehaviourNotificationString(ERlvBehaviour eBhvr, ERlvParamType eType); static const std::string& getString(const std::string& strStringName); @@ -218,6 +220,12 @@ protected: // Inlined class member functions // +// Checked: 2010-10-31 (RLVa-1.2.2a) | Added: RLVa-1.2.2a +inline const std::string& RlvStrings::getAnonym(const LLAvatarName& avName) +{ + return getAnonym(avName.mDisplayName); +} + // Checked: 2010-03-26 (RLVa-1.2.0b) | Modified: RLVa-1.0.2a inline bool RlvUtil::isEmote(const std::string& strUTF8Text) {