summaryrefslogtreecommitdiff
path: root/indra/newview/llinspectremoteobject.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-10-21 14:18:29 -0400
committerLoren Shih <seraph@lindenlab.com>2010-10-21 14:18:29 -0400
commit525de5554022b946641db446a5b5153f9e670e10 (patch)
treed7d679724515f6eb839f87161510ba0a0d06c89b /indra/newview/llinspectremoteobject.cpp
parent219cd6ecda60e1c48852f582f0994573fd0e10ae (diff)
parent71f56a2bc9697989cd012adb57abdc922aa8ae0a (diff)
Automated merge up from viewer-development
Diffstat (limited to 'indra/newview/llinspectremoteobject.cpp')
-rw-r--r--indra/newview/llinspectremoteobject.cpp27
1 files changed, 11 insertions, 16 deletions
diff --git a/indra/newview/llinspectremoteobject.cpp b/indra/newview/llinspectremoteobject.cpp
index e956b3b8de..bf6cf52298 100644
--- a/indra/newview/llinspectremoteobject.cpp
+++ b/indra/newview/llinspectremoteobject.cpp
@@ -60,12 +60,12 @@ public:
private:
void update();
- static void nameCallback(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* data);
+ void onNameCache(const LLUUID& id, const std::string& name, bool is_group);
private:
LLUUID mObjectID;
LLUUID mOwnerID;
- std::string mOwner;
+ std::string mOwnerLegacyName;
std::string mSLurl;
std::string mName;
bool mGroupOwned;
@@ -75,7 +75,7 @@ LLInspectRemoteObject::LLInspectRemoteObject(const LLSD& sd) :
LLInspect(LLSD()),
mObjectID(NULL),
mOwnerID(NULL),
- mOwner(""),
+ mOwnerLegacyName(),
mSLurl(""),
mName(""),
mGroupOwned(false)
@@ -112,10 +112,11 @@ void LLInspectRemoteObject::onOpen(const LLSD& data)
mSLurl = data["slurl"].asString();
// work out the owner's name
- mOwner = "";
+ mOwnerLegacyName = "";
if (gCacheName)
{
- gCacheName->get(mOwnerID, mGroupOwned, nameCallback, this);
+ gCacheName->get(mOwnerID, mGroupOwned, // muting
+ boost::bind(&LLInspectRemoteObject::onNameCache, this, _1, _2, _3));
}
// update the inspector with the current object state
@@ -144,7 +145,7 @@ void LLInspectRemoteObject::onClickMap()
void LLInspectRemoteObject::onClickBlock()
{
LLMute::EType mute_type = mGroupOwned ? LLMute::GROUP : LLMute::AGENT;
- LLMute mute(mOwnerID, mOwner, mute_type);
+ LLMute mute(mOwnerID, mOwnerLegacyName, mute_type);
LLMuteList::getInstance()->add(mute);
LLPanelBlockedList::showPanelAndSelect(mute.mID);
closeFloater();
@@ -155,16 +156,10 @@ void LLInspectRemoteObject::onClickClose()
closeFloater();
}
-//static
-void LLInspectRemoteObject::nameCallback(const LLUUID& id, const std::string& first, const std::string& last, BOOL is_group, void* data)
+void LLInspectRemoteObject::onNameCache(const LLUUID& id, const std::string& name, bool is_group)
{
- LLInspectRemoteObject *self = (LLInspectRemoteObject*)data;
- self->mOwner = first;
- if (!last.empty())
- {
- self->mOwner += " " + last;
- }
- self->update();
+ mOwnerLegacyName = name;
+ update();
}
void LLInspectRemoteObject::update()
@@ -174,7 +169,7 @@ void LLInspectRemoteObject::update()
getChild<LLUICtrl>("object_name")->setValue("<nolink>" + mName + "</nolink>");
// show the object's owner - click it to show profile
- std::string owner = mOwner;
+ std::string owner;
if (! mOwnerID.isNull())
{
if (mGroupOwned)