Fixing up the name system, missed two parts.
This commit is contained in:
Lirusaito
2012-12-06 21:04:06 -05:00
parent 457276fa5d
commit 0100cd2f36
3 changed files with 22 additions and 4 deletions

View File

@@ -1299,9 +1299,20 @@ void LLFloaterIMPanel::init(const std::string& session_label)
void LLFloaterIMPanel::lookupName()
{
std::string title;
if (LLAvatarNameCache::getPNSName(mOtherParticipantUUID, title))
setTitle(title);
LLAvatarNameCache::get(mOtherParticipantUUID, boost::bind(&LLFloaterIMPanel::onAvatarNameLookup, _1, _2, this));
}
//static
void LLFloaterIMPanel::onAvatarNameLookup(const LLUUID&, const LLAvatarName& avatar_name, void* data)
{
LLFloaterIMPanel* self = (LLFloaterIMPanel*)data;
if (self && sFloaterIMPanels.count(self) != 0)
{
std::string title;
LLAvatarNameCache::getPNSName(avatar_name, title);
self->setTitle(title);
}
}
LLFloaterIMPanel::~LLFloaterIMPanel()