- merge : agent names on the minimap tooltip should be anonymized when @shownames=n restricted

--HG--
branch : RLVa
meow-7.2.2
Kitty Barnett 2010-11-01 03:03:13 +01:00
parent 4c3e87ac9b
commit dd554a73a1
2 changed files with 28 additions and 2 deletions

View File

@ -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);

View File

@ -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)
{