diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2010-10-14 14:03:16 -0700 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2010-10-14 14:03:16 -0700 |
commit | 508686047d5e98934d5fefbb576e54f108df6fe3 (patch) | |
tree | 6d751588cc200395d4fef41e61f4683a83a7ab86 /indra/newview/llsyswellwindow.cpp | |
parent | 2303ec6213ea7a591e0084e9fc9350b2afddd3c5 (diff) | |
parent | f53f6f20df5c99311103c3d92938ce878d474f13 (diff) |
Merge from http://hg.secondlife.com/viewer-identity (display names)
Diffstat (limited to 'indra/newview/llsyswellwindow.cpp')
-rw-r--r-- | indra/newview/llsyswellwindow.cpp | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp index 99342bb564..e7b5c13860 100644 --- a/indra/newview/llsyswellwindow.cpp +++ b/indra/newview/llsyswellwindow.cpp @@ -26,14 +26,15 @@ #include "llviewerprecompiledheaders.h" // must be first include +#include "llsyswellwindow.h" + #include "llagent.h" +#include "llavatarnamecache.h" #include "llflatlistview.h" #include "llfloaterreg.h" #include "llnotifications.h" -#include "llsyswellwindow.h" - #include "llbottomtray.h" #include "llscriptfloater.h" #include "llviewercontrol.h" @@ -278,14 +279,31 @@ LLIMWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID& mChiclet->setOtherParticipantId(otherParticipantId); mChiclet->setVisible(true); - LLTextBox* contactName = getChild<LLTextBox>("contact_name"); - contactName->setValue(name); + if (im_chiclet_type == LLIMChiclet::TYPE_IM) + { + LLAvatarNameCache::get(otherParticipantId, + boost::bind(&LLIMWellWindow::RowPanel::onAvatarNameCache, + this, _1, _2)); + } + else + { + LLTextBox* contactName = getChild<LLTextBox>("contact_name"); + contactName->setValue(name); + } mCloseBtn = getChild<LLButton>("hide_btn"); mCloseBtn->setCommitCallback(boost::bind(&LLIMWellWindow::RowPanel::onClosePanel, this)); } //--------------------------------------------------------------------------------- +void LLIMWellWindow::RowPanel::onAvatarNameCache(const LLUUID& agent_id, + const LLAvatarName& av_name) +{ + LLTextBox* contactName = getChild<LLTextBox>("contact_name"); + contactName->setValue( av_name.getCompleteName() ); +} + +//--------------------------------------------------------------------------------- void LLIMWellWindow::RowPanel::onChicletSizeChanged(LLChiclet* ctrl, const LLSD& param) { LLTextBox* text = getChild<LLTextBox>("contact_name"); |