diff options
| author | James Cook <james@lindenlab.com> | 2010-05-07 15:00:36 -0700 | 
|---|---|---|
| committer | James Cook <james@lindenlab.com> | 2010-05-07 15:00:36 -0700 | 
| commit | 2a2c51f278a5ee4dbfc21dfb25fe3eaee94082d7 (patch) | |
| tree | ef3f3960915576aa4a15388a419a277a2dce74d4 | |
| parent | e0164b9669e6f267532cdfa34479962b8267c408 (diff) | |
DEV-49780 Chat/IM history shows SLID in tooltip
Reviewed with Callum
| -rw-r--r-- | indra/newview/llchathistory.cpp | 22 | 
1 files changed, 20 insertions, 2 deletions
| 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<LLTextBox>("user_name"); +		user_name->setToolTip( av_name.mSLID ); +	} +  protected:  	static const S32 PADDING = 20; | 
