static void getSelectedAvatarData(const LLScrollListCtrl* from, uuid_vec_t& avatar_ids, std::vector<LLAvatarName>& avatar_names)
{
	std::vector<LLScrollListItem*> items = from->getAllSelected();
	for (std::vector<LLScrollListItem*>::iterator iter = items.begin(); iter != items.end(); ++iter)
	{
		LLScrollListItem* item = *iter;
		if (item->getUUID().notNull())
		{
			avatar_ids.push_back(item->getUUID());

			std::map<LLUUID, LLAvatarName>::iterator iter = sAvatarNameMap.find(item->getUUID());
			if (iter != sAvatarNameMap.end())
			{
				avatar_names.push_back(iter->second);
			}
			else
			{
				// the only case where it isn't in the name map is friends
				// but it should be in the name cache
				LLAvatarName av_name;
				LLAvatarNameCache::get(item->getUUID(), &av_name);
				avatar_names.push_back(av_name);
			}
		}
	}
}
void LLFloaterAvatarList::onClickTrack(void *userdata)
{
	LLFloaterAvatarList *self = (LLFloaterAvatarList*)userdata;
	
 	LLScrollListItem *item =   self->mAvatarList->getFirstSelected();
	if (!item) return;

	LLUUID agent_id = item->getUUID();

	if (self->mTracking && self->mTrackedAvatar == agent_id) {
		LLTracker::stopTracking(NULL);
		self->mTracking = FALSE;
	}
	else
	{
		self->mTracking = TRUE;
		self->mTrackedAvatar = agent_id;
//		trackAvatar only works for friends allowing you to see them on map...
//		LLTracker::trackAvatar(agent_id, self->mAvatars[agent_id].getName());
		std::string name = self->mAvatars[agent_id].getName();
		if (!self->mUpdate)
		{
			name += "\n(last known position)";
		}
		LLTracker::trackLocation(self->mAvatars[agent_id].getPosition(), name, name);
	}
}
Exemple #3
0
// add item "name" with attached generic data
LLScrollListItem* LLComboBox::add(const std::string& name, LLSD value, EAddPosition pos, BOOL enabled )
{
	LLScrollListItem* item = mList->addSimpleElement(name, pos, value);
	item->setEnabled(enabled);
	mList->selectFirstItem();
	return item;
}
// static
void LLPanelLandMedia::onClickRemoveURLFilter(void *data)
{
	LLPanelLandMedia* panelp = (LLPanelLandMedia*)data;
	if (panelp && panelp->mURLFilterList)
	{
		LLParcel* parcel = panelp->mParcel->getParcel();
		if (parcel)
		{
			LLSD list = parcel->getMediaURLFilterList();
			
			std::vector<LLScrollListItem*> domains = panelp->mURLFilterList->getAllSelected();
			for (std::vector<LLScrollListItem*>::iterator iter = domains.begin(); iter != domains.end(); iter++)
			{
				LLScrollListItem* item = *iter;
				const std::string domain = item->getValue().asString();

				for(S32 i = 0; i < list.size(); i++)
				{
					if (list[i].asString() == domain)
					{
						list.erase(i);
						break;
					}
				}
			}
			
			parcel->setMediaURLFilterList(list);
			LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );

			panelp->refresh();
		}
	}
	
}
// public
void LLNameListCtrl::refresh(const LLUUID& id, const std::string& first, 
							 const std::string& last, BOOL is_group)
{
	//llinfos << "LLNameListCtrl::refresh " << id << " '" << first << " "
	//	<< last << "'" << llendl;

	std::string fullname;
	if (!is_group)
	{
		fullname = first + " " + last;
	}
	else
	{
		fullname = first;
	}

	// TODO: scan items for that ID, fix if necessary
	item_list::iterator iter;
	for (iter = getItemList().begin(); iter != getItemList().end(); iter++)
	{
		LLScrollListItem* item = *iter;
		if (item->getUUID() == id)
		{
			LLScrollListCell* cell = (LLScrollListCell*)item->getColumn(0);
			cell = (LLScrollListCell*)item->getColumn(mNameColumnIndex);

			((LLScrollListText*)cell)->setText( fullname );
		}
	}

	dirtyColumns();
}
void JCFloaterAnimList::RevokeSelected(void *userdata )
{
	JCFloaterAnimList *self = (JCFloaterAnimList*)userdata;
	LLDynamicArray<LLUUID> ids;
	std::vector< LLScrollListItem * > items = self->mAnimList->getAllSelected();
	for( std::vector< LLScrollListItem * >::iterator itr = items.begin(); itr != items.end(); itr++ )
	{
		LLScrollListItem *item = *itr;
		const LLUUID &id = item->getColumn(LIST_OBJECT_UUID)->getValue().asUUID();
		if( ids.find(id) == LLDynamicArray<LLUUID>::FAIL )
		{
			ids.put(id);
		}
	}
	if( !ids.empty() )
	{
		for(LLDynamicArray<LLUUID>::iterator itr = ids.begin(); itr != ids.end(); ++itr)
		{
			LLUUID id = *itr;
			LLMessageSystem* msg = gMessageSystem;
			msg->newMessageFast(_PREHASH_RevokePermissions);
			msg->nextBlockFast(_PREHASH_AgentData);
			msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
			msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
			msg->nextBlockFast(_PREHASH_Data);
			msg->addUUIDFast(_PREHASH_ObjectID, id);
			msg->addU32Fast(_PREHASH_ObjectPermissions, U32_MAX);
			gAgent.sendReliableMessage();
		}
	}
}
void LLFloaterNewIM::onStart(void* userdata)
{
	LLFloaterNewIM* self = (LLFloaterNewIM*) userdata;

	LLScrollListItem* item = self->mSelectionList->getFirstSelected();
	if(item)
	{
		const LLScrollListCell* cell = item->getColumn(0);
		std::string name(cell->getValue());

		// *NOTE: Do a live detrmination of what type of session it
		// should be. If we restrict the new im panel to online users,
		// then we can remove some of this code.
		EInstantMessage type;
		EInstantMessage* t = (EInstantMessage*)item->getUserdata();
		if(t) type = (*t);
		else type = LLIMMgr::defaultIMTypeForAgent(item->getUUID());
		gIMMgr->addSession(name, type, item->getUUID());

		make_ui_sound("UISndStartIM");
	}
	else
	{
		make_ui_sound("UISndInvalidOp");
	}
}
Exemple #8
0
// virtual
LLXMLNodePtr LLComboBox::getXML(bool save_children) const
{
	LLXMLNodePtr node = LLUICtrl::getXML();

	node->setName(LL_COMBO_BOX_TAG);

	// Attributes

	node->createChild("allow_text_entry", TRUE)->setBoolValue(mAllowTextEntry);

	node->createChild("max_chars", TRUE)->setIntValue(mMaxChars);

	// Contents

	std::vector<LLScrollListItem*> data_list = mList->getAllData();
	std::vector<LLScrollListItem*>::iterator data_itor;
	for (data_itor = data_list.begin(); data_itor != data_list.end(); ++data_itor)
	{
		LLScrollListItem* item = *data_itor;
		LLScrollListCell* cell = item->getColumn(0);
		if (cell)
		{
			LLXMLNodePtr item_node = node->createChild("combo_item", FALSE);
			LLSD value = item->getValue();
			item_node->createChild("value", TRUE)->setStringValue(value.asString());
			item_node->createChild("enabled", TRUE)->setBoolValue(item->getEnabled());
			item_node->setStringValue(cell->getValue().asString());
		}
	}

	return node;
}
void FloaterAvatarList::onDoubleClick(void *userdata)
{
	FloaterAvatarList *self = (FloaterAvatarList*)userdata;
 	LLScrollListItem *item =   self->mAvatarList->getFirstSelected();
	LLUUID agent_id = item->getUUID();
	lookAtAvatar(agent_id);
}
void LLPreviewGesture::initDefaultGesture()
{
	LLScrollListItem* item;
	item = addStep("Animation");
	LLGestureStepAnimation* anim = (LLGestureStepAnimation*)item->getUserdata();
	anim->mAnimAssetID = ANIM_AGENT_HELLO;
	anim->mAnimName = "Wave";
	updateLabel(item);

	item = addStep("Wait");
	LLGestureStepWait* wait = (LLGestureStepWait*)item->getUserdata();
	wait->mFlags = WAIT_FLAG_ALL_ANIM;
	updateLabel(item);

	item = addStep("Chat");
	LLGestureStepChat* chat_step = (LLGestureStepChat*)item->getUserdata();
	chat_step->mChatText = "Hello, avatar!";
	updateLabel(item);

	// Start with item list selected
	mStepList->selectFirstItem();

	// this is *new* content, so we are dirty
	mDirty = TRUE;
}
void LLFloaterHUD::onList(LLUICtrl* ctrl, void* userdata)
{
	LLFloaterHUD* self = (LLFloaterHUD*)userdata;
	if (!self)
	{
		return;
	}

	self->mAvatarIDs.clear();
	self->mAvatarNames.clear();

	if (!self->mListNames)
	{
		return;
	}
	
	std::vector<LLScrollListItem*> items =
		self->mListNames->getAllSelected();
	for (
		std::vector<LLScrollListItem*>::iterator iter = items.begin();
		iter != items.end();
		++iter)
	{
		LLScrollListItem* item = *iter;
		self->mAvatarNames.push_back(item->getColumn(0)->getValue().asString());
		self->mAvatarIDs.push_back(item->getUUID());
		self->childSetEnabled("Select", TRUE);
	}
}
void LLPanelGroupInvite::impl::submitInvitations()
{
	std::map<LLUUID, LLUUID> role_member_pairs;

	LLGroupMgrGroupData* gdatap = LLGroupMgr::getInstance()->getGroupData(mGroupID);

	// Default to everyone role.
	LLUUID role_id = LLUUID::null;

	if (mRoleNames)
	{
		role_id = mRoleNames->getCurrentID();
		
		// owner role: display confirmation and wait for callback
		if ((role_id == gdatap->mOwnerRole) && (!mConfirmedOwnerInvite))
		{
			LLSD args;
			args["MESSAGE"] = mOwnerWarning;
			LLNotificationsUtil::add("GenericAlertYesCancel", args, LLSD(), boost::bind(&LLPanelGroupInvite::impl::inviteOwnerCallback, this, _1, _2));
			return; // we'll be called again if user confirms
		}
	}

	bool already_in_group = false;
	//loop over the users
	std::vector<LLScrollListItem*> items = mInvitees->getAllData();
	for (std::vector<LLScrollListItem*>::iterator iter = items.begin();
		 iter != items.end(); ++iter)
	{
		LLScrollListItem* item = *iter;
		if(LLGroupActions::isAvatarMemberOfGroup(mGroupID, item->getUUID()))
		{
			already_in_group = true;
			continue;
		}
		role_member_pairs[item->getUUID()] = role_id;
	}
	
	if (role_member_pairs.size() > MAX_GROUP_INVITES)
	{
		// Fail!
		LLSD msg;
		msg["MESSAGE"] = mTooManySelected;
		LLNotificationsUtil::add("GenericAlert", msg);
		(*mCloseCallback)(mCloseCallbackUserData);
		return;
	}

	LLGroupMgr::getInstance()->sendGroupMemberInvites(mGroupID, role_member_pairs);
	
	if(already_in_group)
	{
		LLSD msg;
		msg["MESSAGE"] = mAlreadyInGroup;
		LLNotificationsUtil::add("GenericAlert", msg);
	}

	//then close
	(*mCloseCallback)(mCloseCallbackUserData);
}
void LLFloaterHUD::onBtnLocate(void* userdata)  //some disabled code does not work yet.... for future ref :)
{
  
        LLFloaterHUD* self = (LLFloaterHUD*)userdata;
        LLScrollListItem *item = self->mListNames->getFirstSelected();

		if ( NULL == item ) return;
				
        LLUUID agent_id = item->getUUID();

		handle_lure(agent_id); //Offering a TP does work client side , not working server side without presence!
				
		/*
		LLVOAvatar* avatarp = (LLVOAvatar*)item;
		std::string tooltip("");
	    std::string name("");
			    
		LLVector3d position = gAgent.getPosGlobalFromAgent(avatarp->getCharacterPosition());
		LLVector3d mypos = gAgent.getPositionGlobal();
        LLVector3d delta =  mypos - position;

       
		LLTracker::trackAvatar(agent_id, name);
		llinfos << "delta = " << delta << "info Kirsten" << llendl;
		llinfos << "position = " << position << "info Kirsten" << llendl;
		LLTracker::trackLocation(position, name, tooltip);
	    gAgent.teleportViaLocation( position); */
	
	
}
// callback from the name cache with an owner name to add to the list
void LLPanelScriptLimitsRegionMemory::onNameCache(
						 const LLUUID& id,
						 const std::string& first_name,
						 const std::string& last_name)
{
	std::string name = first_name + " " + last_name;

	LLScrollListCtrl *list = getChild<LLScrollListCtrl>("scripts_list");	
	if(!list)
	{
		return;
	}
	
	std::vector<LLSD>::iterator id_itor;
	for (id_itor = mObjectListItems.begin(); id_itor != mObjectListItems.end(); ++id_itor)
	{
		LLSD element = *id_itor;
		if(element["owner_id"].asUUID() == id)
		{
			LLScrollListItem* item = list->getItem(element["id"].asUUID());

			if(item)
			{
				item->getColumn(3)->setValue(LLSD(name));
				element["columns"][3]["value"] = name;
			}
		}
	}
}
// static
void HBFloaterGroupTitles::onActivate(void* userdata)
{
	HBFloaterGroupTitles* self = (HBFloaterGroupTitles*) userdata;
	LLScrollListItem *item = self->mTitlesList->getFirstSelected();
	if (!item) return;

	// Set the group if needed.
	LLUUID old_group_id = gAgent.getGroupID();
	LLUUID group_id = item->getColumn(LIST_GROUP_ID)->getValue().asUUID();
	if (group_id != old_group_id)
	{
		LLMessageSystem* msg = gMessageSystem;
		msg->newMessageFast(_PREHASH_ActivateGroup);
		msg->nextBlockFast(_PREHASH_AgentData);
		msg->addUUIDFast(_PREHASH_AgentID, gAgent.getID());
		msg->addUUIDFast(_PREHASH_SessionID, gAgent.getSessionID());
		msg->addUUIDFast(_PREHASH_GroupID, group_id);
		gAgent.sendReliableMessage();
	}

	// Set the title
	LLGroupMgr::getInstance()->sendGroupTitleUpdate(group_id, item->getUUID());
	// Force a refresh via the observer
	if (group_id == LLUUID::null)
	{
		group_id = old_group_id;
	}
	LLGroupMgr::getInstance()->sendGroupTitlesRequest(group_id);
}
BOOL LLLocationInputCtrl::handleToolTip(S32 x, S32 y, MASK mask)
{

	if(mAddLandmarkBtn->parentPointInView(x,y))
	{
		updateAddLandmarkTooltip();
	}
	// Let the buttons show their tooltips.
	if (LLUICtrl::handleToolTip(x, y, mask))
	{
		if (mList->getRect().pointInRect(x, y)) 
		{
			S32 loc_x, loc_y;
			//x,y - contain coordinates related to the location input control, but without taking the expanded list into account
			//So we have to convert it again into local coordinates of mList
			localPointToOtherView(x,y,&loc_x,&loc_y,mList);
			
			LLScrollListItem* item =  mList->hitItem(loc_x,loc_y);
			if (item)
			{
				LLSD value = item->getValue();
				if (value.has("tooltip"))
				{
					LLToolTipMgr::instance().show(value["tooltip"]);
				}
			}
		}

		return TRUE;
	}

	return FALSE;
}
Exemple #17
0
void LLFloaterNewIM::addAgent(const LLUUID& uuid, void* data, BOOL online)
{
	std::string first, last;
	gCacheName->getName(uuid, first, last);
	LLUIString fullname = sNameFormat;
	fullname.setArg("[FIRST]", first);
	fullname.setArg("[LAST]", last);

	LLSD row;
	row["id"] = uuid;
	row["columns"][0]["value"] = fullname;
	row["columns"][0]["width"] = COL_1_WIDTH;
	row["columns"][0]["font"] = "SANSSERIF";
	row["columns"][0]["font-style"] = online ? "BOLD" : "NORMAL";
	row["columns"][1]["value"] = online ? sOnlineDescriptor : "";
	row["columns"][1]["font"] = "SANSSERIF";
	row["columns"][1]["font-style"] = "BOLD";
	LLScrollListItem* itemp = mSelectionList->addElement(row);
	itemp->setUserdata(data);

	if (mSelectionList->getFirstSelectedIndex() == -1)
	{
		mSelectionList->selectFirstItem();
	}
}
Exemple #18
0
// add item "name" with attached userdata
LLScrollListItem* LLComboBox::add(const std::string& name, void* userdata, EAddPosition pos, BOOL enabled )
{
	LLScrollListItem* item = mList->addSimpleElement(name, pos);
	item->setEnabled(enabled);
	item->setUserdata( userdata );
	mList->selectFirstItem();
	return item;
}
LLControlVariable* LLFloaterSettingsDebug::getControlVariable()
{
    LLScrollListItem* item = mSettingsScrollList->getFirstSelected();
    if (!item) return NULL;

    LLControlVariable* controlp = static_cast<LLControlVariable*>(item->getUserdata());

    return controlp ? controlp->getCOAActive() : NULL;
}
Exemple #20
0
void* LLComboBox::getCurrentUserdata()
{
	LLScrollListItem* item = mList->getFirstSelected();
	if( item )
	{
		return item->getUserdata();
	}
	return NULL;
}
BOOL LLFloaterAvatarList::handleKeyHere(KEY key, MASK mask)
{
	LLFloaterAvatarList* self = getInstance();
	LLScrollListItem* item = self->mAvatarList->getFirstSelected();
	if(item)
	{
		LLUUID agent_id = item->getUUID();
		if (( KEY_RETURN == key ) && (MASK_NONE == mask))
		{
			self->mFocusedAvatar = agent_id;
			self->focusOnCurrent();
			return TRUE;
		}
		else if (( KEY_RETURN == key ) && (MASK_CONTROL == mask))
		{
			LLAvatarListEntry* entry = self->getAvatarEntry(agent_id);
			if (entry)
			{
//				llinfos << "Trying to teleport to " << entry->getName() << " at " << entry->getPosition() << llendl;
				gAgent.teleportViaLocation(entry->getPosition());
			}
			return TRUE;
		}
	}

	if (( KEY_RETURN == key ) && (MASK_SHIFT == mask))
	{
		LLDynamicArray<LLUUID> ids = self->mAvatarList->getSelectedIDs();
		if (ids.size() > 0)
		{
			if (ids.size() == 1)
			{
				// Single avatar
				LLUUID agent_id = ids[0];

				// [Ansariel: Display name support]
				LLAvatarName avatar_name;
				if (LLAvatarNameCache::get(agent_id, &avatar_name))
				{
					gIMMgr->setFloaterOpen(TRUE);
					gIMMgr->addSession(LLCacheName::cleanFullName(avatar_name.getLegacyName()),IM_NOTHING_SPECIAL,agent_id);
				}
				// [Ansariel: Display name support]
			}
			else
			{
				// Group IM
				LLUUID session_id;
				session_id.generate();
				gIMMgr->setFloaterOpen(TRUE);
				gIMMgr->addSession("Avatars Conference", IM_SESSION_CONFERENCE_START, ids[0], ids);
			}
		}
	}
	return LLPanel::handleKeyHere(key, mask);
}
Exemple #22
0
// static
void PanelRadar::onClickProfile(void* user_data)
{
	PanelRadar* self = (PanelRadar*) user_data;
	LLScrollListItem *item = self->mRadarList->getFirstSelected();
	if (item != NULL)
	{
		LLUUID agent_id = item->getUUID();
		LLFloaterAvatarInfo::show(agent_id);
	}
}
Exemple #23
0
// add item "name" with attached generic data
LLScrollListItem* LLComboBox::add(const std::string& name, LLSD value, EAddPosition pos, BOOL enabled )
{
	LLScrollListItem* item = mList->addSimpleElement(name, pos, value);
	item->setEnabled(enabled);
	if (!mAllowTextEntry && mLabel.empty())
	{
		selectFirstItem();
	}
	return item;
}
Exemple #24
0
// static
void PanelRadar::onClickOfferTeleport(void* user_data)
{
	PanelRadar* self = (PanelRadar*) user_data;
	LLScrollListItem *item = self->mRadarList->getFirstSelected();
	if (item != NULL)
	{
		LLUUID agent_id = item->getUUID();
		handle_lure(agent_id);
	}
}
Exemple #25
0
// static
void PanelRadar::onClickAddFriend(void* user_data)
{
	PanelRadar* self = (PanelRadar*) user_data;
	LLScrollListItem *item = self->mRadarList->getFirstSelected();
	if (item != NULL)
	{
		LLUUID agent_id = item->getUUID();
		LLPanelFriends::requestFriendshipDialog(agent_id, self->getSelectedName(agent_id));
	}
}
void LLFloaterAvatarList::onClickFocus(void *userdata)
{
	LLFloaterAvatarList *self = (LLFloaterAvatarList*)userdata;
	
 	LLScrollListItem *item = self->mAvatarList->getFirstSelected();
	if (item)
	{
		self->mFocusedAvatar = item->getUUID();
		self->focusOnCurrent();
	}
}
Exemple #27
0
// static
void PanelRadar::onClickIM(void* user_data)
{
	PanelRadar* self = (PanelRadar*) user_data;
	LLScrollListItem *item = self->mRadarList->getFirstSelected();
	if (item != NULL)
	{
		LLUUID agent_id = item->getUUID();
		gIMMgr->setFloaterOpen(TRUE);
		gIMMgr->addSession(self->getSelectedName(agent_id), IM_NOTHING_SPECIAL, agent_id);
	}
}
void FSAreaSearch::onDoubleClick()
{
 	LLScrollListItem *item = mResultList->getFirstSelected();
	if (!item) return;
	LLUUID object_id = item->getUUID();
	LLViewerObject* objectp = gObjectList.findObject(object_id);
	if (objectp)
	{
		LLTracker::trackLocation(objectp->getPositionGlobal(), mObjectDetails[object_id].name, "", LLTracker::LOCATION_ITEM);
	}
}
// Update controls based on current settings
void LLPrefsAscentVan::refresh()
{
    //General --------------------------------------------------------------------------------

    //Tags\Colors ----------------------------------------------------------------------------
    //Colors ---------------------------------------------------------------------------------
	LLComboBox* combo = getChild<LLComboBox>("tag_spoofing_combobox");
	if(LLVOAvatar::sClientResolutionList.has("isComplete"))
	{
		//combo->setColor(LLColor4::black);
		combo->clear();
		for(LLSD::map_iterator itr = LLVOAvatar::sClientResolutionList.beginMap(); itr != LLVOAvatar::sClientResolutionList.endMap(); itr++)
		{
			LLSD value = (*itr).second;
			if(value.has("name"))
			{
				std::string name = value.get("name");
				std::string uuid = (*itr).first;
				LLColor4 color = LLColor4(value.get("color"));
				if(value["multiple"].asReal() != 0)
				{
					color *= 1.0/(value["multiple"].asReal()+1.0f);
				}
				LLScrollListItem* item = combo->add(name,uuid);
				//bad practice
				item->getColumn(0)->setColor(color);
			}
		}
		//add Viewer 2.0
		LLScrollListItem* item = combo->add("Viewer 2.0",IMG_DEFAULT_AVATAR);
		//bad practice
		item->getColumn(0)->setColor(LLColor4::black);
	}
	combo->setCurrentByIndex(mSelectedClient);

    childSetEnabled("friends_color_textbox",     mUseStatusColors);
    childSetEnabled("friend_color_swatch",       mUseStatusColors);
    childSetEnabled("estate_owner_color_swatch", mUseStatusColors);
    childSetEnabled("linden_color_swatch",       mUseStatusColors);
    childSetEnabled("muted_color_swatch",        mUseStatusColors);

    childSetEnabled("custom_tag_label_text",   mCustomTagOn);
    childSetEnabled("custom_tag_label_box",    mCustomTagOn);
    childSetValue("custom_tag_label_box", gSavedSettings.getString("AscentCustomTagLabel"));
    childSetEnabled("custom_tag_color_text",   mCustomTagOn);
    childSetEnabled("custom_tag_color_swatch", mCustomTagOn);

    //Body Dynamics --------------------------------------------------------------------------
    childSetEnabled("EmeraldBoobMass",     mBreastPhysicsToggle);
    childSetEnabled("EmeraldBoobHardness", mBreastPhysicsToggle);
    childSetEnabled("EmeraldBoobVelMax",   mBreastPhysicsToggle);
    childSetEnabled("EmeraldBoobFriction", mBreastPhysicsToggle);
    childSetEnabled("EmeraldBoobVelMin",   mBreastPhysicsToggle);
}
// propagate actual relationship to UI.
// Does not resort the UI list because it can be called frequently. JC
BOOL LLPanelFriends::updateFriendItem(const LLUUID& agent_id, const LLRelationship* info)
{
	if (!info) return FALSE;
	LLScrollListItem* itemp = mFriendsList->getItem(agent_id);
	if (!itemp) return FALSE;
	
	bool isOnlineSIP = LLVoiceClient::getInstance()->isOnlineSIP(itemp->getUUID());
	bool isOnline = info->isOnline();

	std::string fullname;
	BOOL have_name = gCacheName->getFullName(agent_id, fullname);
	if (have_name)
	{
		if (LLAvatarNameCache::useDisplayNames() && !gSavedSettings.getBOOL("LegacyNamesForFriends"))
		{
			LLAvatarName avatar_name;
			if (LLAvatarNameCache::get(agent_id, &avatar_name))
			{
				if (LLAvatarNameCache::useDisplayNames() == 2)
				{
					fullname = avatar_name.mDisplayName;
				}
				else
				{
					fullname = avatar_name.getNames();
				}
			}
		}
	}
	// Name of the status icon to use
	std::string statusIcon;
	
	if(isOnline)
	{
		statusIcon = "icon_avatar_online.tga";
	}
	else if(isOnlineSIP)
	{
		statusIcon = ONLINE_SIP_ICON_NAME;
	}

	itemp->getColumn(LIST_ONLINE_STATUS)->setValue(statusIcon);
	
	itemp->getColumn(LIST_FRIEND_NAME)->setValue(fullname);
	// render name of online friends in bold text
	((LLScrollListText*)itemp->getColumn(LIST_FRIEND_NAME))->setFontStyle((isOnline || isOnlineSIP) ? LLFontGL::BOLD : LLFontGL::NORMAL);	
	itemp->getColumn(LIST_VISIBLE_ONLINE)->setValue(info->isRightGrantedTo(LLRelationship::GRANT_ONLINE_STATUS));
	itemp->getColumn(LIST_VISIBLE_MAP)->setValue(info->isRightGrantedTo(LLRelationship::GRANT_MAP_LOCATION));
	itemp->getColumn(LIST_EDIT_MINE)->setValue(info->isRightGrantedTo(LLRelationship::GRANT_MODIFY_OBJECTS));
	S32 change_generation = have_name ? info->getChangeSerialNum() : -1;
	itemp->getColumn(LIST_FRIEND_UPDATE_GEN)->setValue(change_generation);

	// enable this item, in case it was disabled after user input
	itemp->setEnabled(TRUE);

	// Do not resort, this function can be called frequently.
	return have_name;
}