summaryrefslogtreecommitdiff
path: root/indra/newview/llavatarlistitem.cpp
diff options
context:
space:
mode:
authorMike Antipov <mantipov@productengine.com>2009-12-02 18:38:44 +0200
committerMike Antipov <mantipov@productengine.com>2009-12-02 18:38:44 +0200
commitb2891b732f145ee0d170afd8b116b834a0879973 (patch)
treef4dcd345af5877668bd89c5a33a8828e145c7b4f /indra/newview/llavatarlistitem.cpp
parent34b624f873ce931c6089487d5381d76f99494feb (diff)
Implemented major task EXT-2985 (Implement Avaline calls processing in Voice Control Panel)
-- improved Voice Control Panel to show avaline caller number as its name. Separate instance of derived from LLAvatarListItem class was provided --HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llavatarlistitem.cpp')
-rw-r--r--indra/newview/llavatarlistitem.cpp23
1 files changed, 14 insertions, 9 deletions
diff --git a/indra/newview/llavatarlistitem.cpp b/indra/newview/llavatarlistitem.cpp
index 3bee5c353f..59ed391c06 100644
--- a/indra/newview/llavatarlistitem.cpp
+++ b/indra/newview/llavatarlistitem.cpp
@@ -42,7 +42,7 @@
#include "llavatariconctrl.h"
#include "llbutton.h"
-LLAvatarListItem::LLAvatarListItem()
+LLAvatarListItem::LLAvatarListItem(bool not_from_ui_factory/* = true*/)
: LLPanel(),
mAvatarIcon(NULL),
mAvatarName(NULL),
@@ -55,14 +55,12 @@ LLAvatarListItem::LLAvatarListItem()
mShowInfoBtn(true),
mShowProfileBtn(true)
{
- LLUICtrlFactory::getInstance()->buildPanel(this, "panel_avatar_list_item.xml");
- // Remember avatar icon width including its padding from the name text box,
- // so that we can hide and show the icon again later.
-
- mIconWidth = mAvatarName->getRect().mLeft - mAvatarIcon->getRect().mLeft;
- mInfoBtnWidth = mInfoBtn->getRect().mRight - mSpeakingIndicator->getRect().mRight;
- mProfileBtnWidth = mProfileBtn->getRect().mRight - mInfoBtn->getRect().mRight;
- mSpeakingIndicatorWidth = mSpeakingIndicator->getRect().mRight - mAvatarName->getRect().mRight;
+ if (not_from_ui_factory)
+ {
+ LLUICtrlFactory::getInstance()->buildPanel(this, "panel_avatar_list_item.xml");
+ }
+ // *NOTE: mantipov: do not use any member here. They can be uninitialized here in case instance
+ // is created from the UICtrlFactory
}
LLAvatarListItem::~LLAvatarListItem()
@@ -87,6 +85,13 @@ BOOL LLAvatarListItem::postBuild()
mProfileBtn->setVisible(false);
mProfileBtn->setClickedCallback(boost::bind(&LLAvatarListItem::onProfileBtnClick, this));
+ // Remember avatar icon width including its padding from the name text box,
+ // so that we can hide and show the icon again later.
+ mIconWidth = mAvatarName->getRect().mLeft - mAvatarIcon->getRect().mLeft;
+ mInfoBtnWidth = mInfoBtn->getRect().mRight - mSpeakingIndicator->getRect().mRight;
+ mProfileBtnWidth = mProfileBtn->getRect().mRight - mInfoBtn->getRect().mRight;
+ mSpeakingIndicatorWidth = mSpeakingIndicator->getRect().mRight - mAvatarName->getRect().mRight;
+
/*
if(!p.buttons.profile)
{