summaryrefslogtreecommitdiff
path: root/indra/newview/llsyswellwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llsyswellwindow.cpp')
-rw-r--r--indra/newview/llsyswellwindow.cpp30
1 files changed, 24 insertions, 6 deletions
diff --git a/indra/newview/llsyswellwindow.cpp b/indra/newview/llsyswellwindow.cpp
index 750fbe54a7..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"
@@ -249,7 +250,7 @@ LLIMWellWindow::RowPanel::RowPanel(const LLSysWellWindow* parent, const LLUUID&
S32 chicletCounter, const std::string& name, const LLUUID& otherParticipantId) :
LLPanel(LLPanel::Params()), mChiclet(NULL), mParent(parent)
{
- LLUICtrlFactory::getInstance()->buildPanel(this, "panel_activeim_row.xml", NULL);
+ buildFromFile( "panel_activeim_row.xml", NULL);
// Choose which of the pre-created chiclets (IM/group) to use.
// The other one gets hidden.
@@ -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");
@@ -346,7 +364,7 @@ LLIMWellWindow::ObjectRowPanel::ObjectRowPanel(const LLUUID& notification_id, bo
: LLPanel()
, mChiclet(NULL)
{
- LLUICtrlFactory::getInstance()->buildPanel(this, "panel_active_object_row.xml", NULL);
+ buildFromFile( "panel_active_object_row.xml", NULL);
initChiclet(notification_id);