diff options
author | James Cook <james@lindenlab.com> | 2010-02-11 16:39:15 -0800 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-02-11 16:39:15 -0800 |
commit | c2373fb5a6b08b2c32e5f93fa67b25f669e8b47f (patch) | |
tree | 1d699db4ebe531cdeeffb7dd16dee4e565d7da26 /indra/newview | |
parent | 9dd7924b19651abf393f7b0dee632904a6b8e52a (diff) |
Created stub LLAvatarNameCache for display name lookup, as
well as LLAvatarName base data object.
Reviewed with Kelly.
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llinspectavatar.cpp | 16 | ||||
-rw-r--r-- | indra/newview/lltoolpie.cpp | 7 | ||||
-rw-r--r-- | indra/newview/llvoavatar.cpp | 7 |
3 files changed, 17 insertions, 13 deletions
diff --git a/indra/newview/llinspectavatar.cpp b/indra/newview/llinspectavatar.cpp index 41dbeab5a7..6dddc133c2 100644 --- a/indra/newview/llinspectavatar.cpp +++ b/indra/newview/llinspectavatar.cpp @@ -37,6 +37,7 @@ #include "llagent.h" #include "llagentdata.h" #include "llavataractions.h" +#include "llavatarnamecache.h" #include "llavatarpropertiesprocessor.h" #include "llcallingcard.h" #include "lldateutil.h" @@ -603,24 +604,25 @@ void LLInspectAvatar::onVolumeChange(const LLSD& data) void LLInspectAvatar::onNameCache( const LLUUID& id, - const std::string& name, + const std::string& full_name, bool is_group) { if (id == mAvatarID) { - mAvatarName = name; + mAvatarName = full_name; // IDEVO JAMESDEBUG - need to always display a display name - std::string display_name; - if (gCacheName->getDisplayName(mAvatarID, display_name)) + LLAvatarName av_name; + if (LLAvatarNameCache::get(mAvatarID, &av_name)) { - getChild<LLUICtrl>("user_name")->setValue(display_name); + getChild<LLUICtrl>("user_name")->setValue(av_name.mDisplayName); + getChild<LLUICtrl>("user_slid")->setValue(av_name.mSLID); } else { - getChild<LLUICtrl>("user_name")->setValue(name); + getChild<LLUICtrl>("user_name")->setValue(full_name); + getChild<LLUICtrl>("user_slid")->setValue(full_name); } - getChild<LLUICtrl>("user_slid")->setValue(name); } } diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index 4a61bed475..9480ca0fdf 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -39,6 +39,7 @@ #include "llparcel.h" #include "llagent.h" +#include "llavatarnamecache.h" #include "llviewercontrol.h" #include "llfocusmgr.h" //#include "llfirstuse.h" @@ -871,10 +872,10 @@ BOOL LLToolPie::handleTooltipObject( LLViewerObject* hover_object, std::string l full_name = LLTrans::getString("TooltipPerson"); } } - std::string display_name; - if (gCacheName->getDisplayName(hover_object->getID(), display_name)) + LLAvatarName av_name; + if (LLAvatarNameCache::get(hover_object->getID(), &av_name)) { - final_name = display_name + " (" + full_name + ")"; + final_name = av_name.mDisplayName + " (" + av_name.mSLID + ")"; } else { diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 265adb3e7f..e4de75d173 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -51,6 +51,7 @@ #include "llagent.h" // Get state values from here #include "llagentwearables.h" #include "llanimationstates.h" +#include "llavatarnamecache.h" #include "llavatarpropertiesprocessor.h" #include "llviewercontrol.h" #include "llcallingcard.h" // IDEVO for LLAvatarTracker @@ -2804,10 +2805,10 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last) line += "\n"; } - std::string display_name; - if (gCacheName->getDisplayName(getID(), display_name)) + LLAvatarName av_name; + if (LLAvatarNameCache::get(getID(), &av_name)) { - line += display_name; + line += av_name.mDisplayName; } else { |