void LLAvatarList::addNewItem(const LLUUID& id, const std::string& name, BOOL is_online, EAddPosition pos)
{
	LLAvatarListItem* item = new LLAvatarListItem();
// [RLVa:KB] - Checked: 2010-04-05 (RLVa-1.2.2a) | Added: RLVa-1.2.0d
	item->setRlvCheckShowNames(mRlvCheckShowNames);
// [/RLVa:KB]
	
	// AO: Adjust some parameters that need to be changed when we adjust item spacing form the .xml default
	// If you change these, also change setLineHeight()
	if (mItemHeight != 0)
	{
		S32 width = item->getRect().getWidth();
		item->reshape(width,mItemHeight);
		LLIconCtrl* highlight = item->getChild<LLIconCtrl>("hovered_icon");
		LLIconCtrl* select = item->getChild<LLIconCtrl>("selected_icon");
		highlight->setOrigin(0,24-mItemHeight); // temporary hack to be in the right ballpark.
		highlight->reshape(width,mItemHeight);
		select->setOrigin(0,24-mItemHeight);
		select->reshape(width,mItemHeight);
	}
	
	// This sets the name as a side effect
	item->setAvatarId(id, mSessionID, mIgnoreOnlineStatus);
	item->setOnline(mIgnoreOnlineStatus ? true : is_online);
	item->showLastInteractionTime(mShowLastInteractionTime);

	item->setAvatarIconVisible(mShowIcons);
	item->setShowInfoBtn(mShowInfoBtn);
	item->setShowVoiceVolume(mShowVoiceVolume);
	item->setShowProfileBtn(mShowProfileBtn);
	item->showSpeakingIndicator(mShowSpeakingIndicator);
	item->setShowPermissions(mShowPermissions);
	item->showUsername(mShowUsername);
	item->showDisplayName(mShowDisplayName);
	item->showRange(mShowRange);
	item->showFirstSeen(mShowFirstSeen);
	item->showStatusFlags(mShowStatusFlags);
	item->showPaymentStatus(mShowPaymentStatus);
	item->showAvatarAge(mShowAge);
	
	// [Ansariel: Colorful radar]
	item->setUseRangeColors(mUseRangeColors);
	LLUIColorTable* colorTable = &LLUIColorTable::instance();
	item->setShoutRangeColor(colorTable->getColor("AvatarListItemShoutRange", LLColor4::yellow));
	item->setBeyondShoutRangeColor(colorTable->getColor("AvatarListItemBeyondShoutRange", LLColor4::red));
	// [/Ansariel: Colorful radar]

	item->setDoubleClickCallback(boost::bind(&LLAvatarList::onItemDoubleClicked, this, _1, _2, _3, _4));

	addItem(item, id, pos);
}
void LLAvatarList::setItemHeight(S32 height)
// AO: Adjust some parameters that need to be changed when we adjust item spacing form the .xml default
// If you change these, also change addNewItem()
{
	mItemHeight = height;
	std::vector<LLPanel*> items;
	getItems(items);
	for(std::vector<LLPanel*>::const_iterator it = items.begin(), end_it = items.end(); it != end_it; ++it)
	{
		LLAvatarListItem* avItem = static_cast<LLAvatarListItem*>(*it);
		if (mItemHeight != 0)
		{
			S32 width = avItem->getRect().getWidth();
			avItem->reshape(width,mItemHeight);
			LLIconCtrl* highlight = avItem->getChild<LLIconCtrl>("hovered_icon");
			LLIconCtrl* select = avItem->getChild<LLIconCtrl>("selected_icon");
			highlight->setOrigin(0,24-height); // temporary hack to be in the right ballpark.
			highlight->reshape(width,mItemHeight);
			select->setOrigin(0,24-height);
			select->reshape(width,mItemHeight);
		}
	}
	mNeedUpdateNames = true;
}