From 2a2c51f278a5ee4dbfc21dfb25fe3eaee94082d7 Mon Sep 17 00:00:00 2001 From: James Cook Date: Fri, 7 May 2010 15:00:36 -0700 Subject: DEV-49780 Chat/IM history shows SLID in tooltip Reviewed with Callum --- indra/newview/llchathistory.cpp | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp index 2934dc1010..6fe23f872c 100644 --- a/indra/newview/llchathistory.cpp +++ b/indra/newview/llchathistory.cpp @@ -32,10 +32,12 @@ #include "llviewerprecompiledheaders.h" +#include "llchathistory.h" + +#include "llavatarnamecache.h" #include "llinstantmessage.h" #include "llimview.h" -#include "llchathistory.h" #include "llcommandhandler.h" #include "llpanel.h" #include "lluictrlfactory.h" @@ -240,7 +242,12 @@ public: mAvatarID = chat.mFromID; mSessionID = chat.mSessionID; mSourceType = chat.mSourceType; - gCacheName->get(mAvatarID, false, boost::bind(&LLChatHistoryHeader::nameUpdatedCallback, this, _1, _2, _3)); + //gCacheName->get(mAvatarID, false, boost::bind(&LLChatHistoryHeader::nameUpdatedCallback, this, _1, _2, _3)); + if (mAvatarID.notNull()) + { + LLAvatarNameCache::get(mAvatarID, + boost::bind(&LLChatHistoryHeader::onAvatarNameCache, this, _1, _2)); + } //*TODO overly defensive thing, source type should be maintained out there if((chat.mFromID.isNull() && chat.mFromName.empty()) || chat.mFromName == SYSTEM_FROM) @@ -323,6 +330,17 @@ public: return; mFrom = full_name; } + + void onAvatarNameCache(const LLUUID& agent_id, const LLAvatarName& av_name) + { + if (agent_id != mAvatarID) return; + + // HACK: just update tooltip + setToolTip( av_name.mSLID ); + LLTextBox* user_name = getChild("user_name"); + user_name->setToolTip( av_name.mSLID ); + } + protected: static const S32 PADDING = 20; -- cgit v1.2.3