summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Cook <james@lindenlab.com>2010-04-27 11:56:13 -0700
committerJames Cook <james@lindenlab.com>2010-04-27 11:56:13 -0700
commit6d239f7cfae65e6c8354d9f94061e81e82112a44 (patch)
tree4ef1cc84fe1e9d08a8449555ccb859e8eabec4d7
parentaf5dd4fbfa6fdee3d38167ec1153d01fd4265b35 (diff)
Convert profile panel to new avatar name cache
-rw-r--r--indra/newview/llpanelprofileview.cpp25
-rw-r--r--indra/newview/llpanelprofileview.h10
2 files changed, 14 insertions, 21 deletions
diff --git a/indra/newview/llpanelprofileview.cpp b/indra/newview/llpanelprofileview.cpp
index 5688c6960b..526db2a192 100644
--- a/indra/newview/llpanelprofileview.cpp
+++ b/indra/newview/llpanelprofileview.cpp
@@ -108,8 +108,10 @@ void LLPanelProfileView::onOpen(const LLSD& key)
}
// Update the avatar name.
- gCacheName->get(getAvatarId(), false,
- boost::bind(&LLPanelProfileView::onNameCache, this, _1, _2, _3));
+// gCacheName->get(getAvatarId(), false,
+// boost::bind(&LLPanelProfileView::onNameCache, this, _1, _2, _3));
+ LLAvatarNameCache::get(getAvatarId(),
+ boost::bind(&LLPanelProfileView::onAvatarNameCache, this, _1, _2));
updateOnlineStatus();
@@ -199,22 +201,11 @@ void LLPanelProfileView::processOnlineStatus(bool online)
mStatusText->setValue(status);
}
-void LLPanelProfileView::onNameCache(const LLUUID& id, const std::string& full_name, bool is_group)
+void LLPanelProfileView::onAvatarNameCache(const LLUUID& agent_id,
+ const LLAvatarName& av_name)
{
- llassert(getAvatarId() == id);
- // IDEVO
- LLAvatarName av_name;
- if (LLAvatarNameCache::useDisplayNames()
- && LLAvatarNameCache::get(id, &av_name))
- {
- getChild<LLUICtrl>("user_name")->setValue( av_name.mDisplayName );
- getChild<LLUICtrl>("user_slid")->setValue( av_name.mSLID );
- }
- else
- {
- getChild<LLUICtrl>("user_name")->setValue(full_name);
- getChild<LLUICtrl>("user_slid")->setValue("");
- }
+ getChild<LLUICtrl>("user_name")->setValue( av_name.mDisplayName );
+ getChild<LLUICtrl>("user_slid")->setValue( av_name.mSLID );
}
// EOF
diff --git a/indra/newview/llpanelprofileview.h b/indra/newview/llpanelprofileview.h
index 2b67be12e5..dedb617c27 100644
--- a/indra/newview/llpanelprofileview.h
+++ b/indra/newview/llpanelprofileview.h
@@ -39,6 +39,7 @@
#include "llagent.h"
#include "lltooldraganddrop.h"
+class LLAvatarName;
class LLPanelProfile;
class LLPanelProfileTab;
class LLTextBox;
@@ -99,10 +100,11 @@ protected:
private:
// LLCacheName will call this function when avatar name is loaded from server.
// This is required to display names that have not been cached yet.
- void onNameCache(
- const LLUUID& id,
- const std::string& full_name,
- bool is_group);
+// void onNameCache(
+// const LLUUID& id,
+// const std::string& full_name,
+// bool is_group);
+ void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name);
LLTextBox* mStatusText;
AvatarStatusObserver* mAvatarStatusObserver;