summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelprofileview.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/llpanelprofileview.cpp
parente2b8c1c699f75e234776beda939205a247fb1bc3 (diff)
parent56e0d59ebcc98515c24f7706569b6e7362981432 (diff)
merge
Diffstat (limited to 'indra/newview/llpanelprofileview.cpp')
-rw-r--r--indra/newview/llpanelprofileview.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp
index 044036ea50..d22d8d2718 100644
--- a/indra/newview/llpanelprofileview.cpp
+++ b/indra/newview/llpanelprofileview.cpp
@@ -32,11 +32,12 @@
#include "llviewerprecompiledheaders.h"
+#include "llpanelprofileview.h"
+
#include "llavatarconstants.h"
+#include "llavatarnamecache.h" // IDEVO
#include "lluserrelations.h"
-#include "llpanelprofileview.h"
-
#include "llavatarpropertiesprocessor.h"
#include "llcallingcard.h"
#include "llpanelavatar.h"
@@ -104,11 +105,15 @@ void LLPanelProfileView::onOpen(const LLSD& key)
if(id.notNull() && getAvatarId() != id)
{
setAvatarId(id);
+
+ // clear name fields, which might have old data
+ getChild<LLUICtrl>("user_name")->setValue( LLSD() );
+ getChild<LLUICtrl>("user_slid")->setValue( LLSD() );
}
// Update the avatar name.
- gCacheName->get(getAvatarId(), FALSE,
- boost::bind(&LLPanelProfileView::onAvatarNameCached, this, _1, _2, _3, _4));
+ LLAvatarNameCache::get(getAvatarId(),
+ boost::bind(&LLPanelProfileView::onAvatarNameCache, this, _1, _2));
updateOnlineStatus();
@@ -198,10 +203,11 @@ void LLPanelProfileView::processOnlineStatus(bool online)
mStatusText->setValue(status);
}
-void LLPanelProfileView::onAvatarNameCached(const LLUUID& id, const std::string& first_name, const std::string& last_name, BOOL is_group)
+void LLPanelProfileView::onAvatarNameCache(const LLUUID& agent_id,
+ const LLAvatarName& av_name)
{
- llassert(getAvatarId() == id);
- getChild<LLUICtrl>("user_name", FALSE)->setValue(first_name + " " + last_name);
+ getChild<LLUICtrl>("user_name")->setValue( av_name.mDisplayName );
+ getChild<LLUICtrl>("user_slid")->setValue( av_name.mUsername );
}
// EOF