- fixed : object owner name isn't anonimized when @shownames=n restricted (continued still)

-> fixed on the Inspect floater

--HG--
branch : RLVa
meow-7.2.2
Kitty Barnett 2010-08-25 15:07:30 +02:00
parent 9dbe5f46eb
commit 0f99c706d8
1 changed files with 36 additions and 2 deletions

View File

@ -40,6 +40,9 @@
#include "llviewercontrol.h"
#include "llviewerobject.h"
#include "lluictrlfactory.h"
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b)
#include "rlvhandler.h"
// [/RLVa:KB]
//LLFloaterInspect* LLFloaterInspect::sInstance = NULL;
@ -113,7 +116,16 @@ void LLFloaterInspect::onClickCreatorProfile()
LLSelectNode* node = mObjectSelection->getFirstNode(&func);
if(node)
{
LLAvatarActions::showProfile(node->mPermissions->getCreator());
// LLAvatarActions::showProfile(node->mPermissions->getCreator());
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.0.0e
const LLUUID& idCreator = node->mPermissions->getCreator();
if ( (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES)) &&
((node->mPermissions->getOwner() == idCreator) || (RlvHandler::isNearbyAgent(idCreator))) )
{
return;
}
LLAvatarActions::showProfile(idCreator);
// [/RLVa:KB]
}
}
}
@ -139,6 +151,10 @@ void LLFloaterInspect::onClickOwnerProfile()
if(node)
{
const LLUUID& owner_id = node->mPermissions->getOwner();
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.0.0e
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
return;
// [/RLVa:KB]
LLAvatarActions::showProfile(owner_id);
}
}
@ -148,8 +164,13 @@ void LLFloaterInspect::onSelectObject()
{
if(LLFloaterInspect::getSelectedUUID() != LLUUID::null)
{
childSetEnabled("button owner", true);
// childSetEnabled("button owner", true);
// childSetEnabled("button creator", true);
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.0.0e
childSetEnabled("button owner", !gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES));
// TODO-RLVa: [RLVa-1.2.2] Is it worth checking the selected node just to selectively disable this button?
childSetEnabled("button creator", true);
// [/RLVa:KB]
}
}
@ -208,6 +229,19 @@ void LLFloaterInspect::refresh()
gCacheName->getFullName(obj->mPermissions->getOwner(), owner_name);
gCacheName->getFullName(obj->mPermissions->getCreator(), creator_name);
// [RLVa:KB] - Checked: 2010-08-25 (RLVa-1.2.1b) | Modified: RLVa-1.2.1b
if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES))
{
if (!obj->mPermissions->isGroupOwned())
owner_name = RlvStrings::getAnonym(owner_name);
const LLUUID& idCreator = obj->mPermissions->getCreator();
if ( (obj->mPermissions->getOwner() == idCreator) || (RlvHandler::isNearbyAgent(idCreator)) )
creator_name = RlvStrings::getAnonym(creator_name);
}
// [/RLVa:KB]
row["id"] = obj->getObject()->getID();
row["columns"][0]["column"] = "object_name";
row["columns"][0]["type"] = "text";