summaryrefslogtreecommitdiff
path: root/indra/newview/llinspectremoteobject.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2010-06-03 14:15:11 -0700
committerRichard Linden <none@none>2010-06-03 14:15:11 -0700
commitf79ac664dd6eead75368ced40110b6f0474aa92e (patch)
treeb24c616c96d32e0b20c5dd0a217701922f884ee6 /indra/newview/llinspectremoteobject.cpp
parente2b8c1c699f75e234776beda939205a247fb1bc3 (diff)
parent56e0d59ebcc98515c24f7706569b6e7362981432 (diff)
merge
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 97ff771658..b651306d96 100644
--- a/indra/newview/llinspectremoteobject.cpp
+++ b/indra/newview/llinspectremoteobject.cpp
@@ -66,12 +66,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;
@@ -81,7 +81,7 @@ LLInspectRemoteObject::LLInspectRemoteObject(const LLSD& sd) :
LLInspect(LLSD()),
mObjectID(NULL),
mOwnerID(NULL),
- mOwner(""),
+ mOwnerLegacyName(),
mSLurl(""),
mName(""),
mGroupOwned(false)
@@ -118,10 +118,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
@@ -141,7 +142,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();
@@ -152,16 +153,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()
@@ -171,7 +166,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)