예제 #1
0
void LLPanelObjectTools::callbackAvatarID(const uuid_vec_t& ids, const std::vector<LLAvatarName> names)
{
	if (ids.empty() || names.empty()) return;
	mTargetAvatar = ids[0];
	getChild<LLUICtrl>("target_avatar_name")->setValue(names[0].getCompleteName());
	refresh();
}
예제 #2
0
void LLListContextMenu::show(LLView* spawning_view, const uuid_vec_t& uuids, S32 x, S32 y)
{
	LLContextMenu* menup = mMenuHandle.get();
	if (menup)
	{
		//preventing parent (menu holder) from deleting already "dead" context menus on exit
		LLView* parent = menup->getParent();
		if (parent)
		{
			parent->removeChild(menup);
		}
		delete menup;
		mUUIDs.clear();
	}

	if ( uuids.empty() )
	{
		return;
	}

	mUUIDs.resize(uuids.size());
	std::copy(uuids.begin(), uuids.end(), mUUIDs.begin());

	menup = createMenu();
	if (!menup)
	{
		llwarns << "Context menu creation failed" << llendl;
		return;
	}

	mMenuHandle = menup->getHandle();
	menup->show(x, y);
	LLMenuGL::showPopup(spawning_view, menup, x, y);
}
예제 #3
0
void LLPanelBlockedList::callbackBlockPicked(const std::vector<std::string>& names, const uuid_vec_t& ids)
{
	if (names.empty() || ids.empty()) return;
	LLMute mute(ids[0], names[0], LLMute::AGENT);
	LLMuteList::getInstance()->add(mute);
	showPanelAndSelect(mute.mID);
}
예제 #4
0
// static
void LLPanelFriends::onPickAvatar(  const uuid_vec_t& ids,
									const std::vector<LLAvatarName>& names )
{
	if (names.empty()) return;
	if (ids.empty()) return;
	LLAvatarActions::requestFriendshipDialog(ids[0], names[0].getCompleteName());
}
예제 #5
0
void LLPanelBlockedList::callbackBlockPicked(const uuid_vec_t& ids, const std::vector<LLAvatarName> names)
{
	if (names.empty() || ids.empty()) return;
	LLMute mute(ids[0], names[0].getLegacyName(), LLMute::AGENT);
	LLMuteList::getInstance()->add(mute);
	showPanelAndSelect(mute.mID);
}
예제 #6
0
//-----------------------------------------------------------------------------
// onPickUser()
//-----------------------------------------------------------------------------
void LLFloaterMute::onPickUser(const uuid_vec_t& ids, const std::vector<LLAvatarName>& names)
{
	if (names.empty() || ids.empty()) return;

	LLMute mute(ids[0], names[0].getLegacyName(), LLMute::AGENT);
	LLMuteList::getInstance()->add(mute);
	updateButtons();
}
예제 #7
0
// static
void LLPanelFriends::onClickPay(void* user_data)
{
	LLPanelFriends* panelp = (LLPanelFriends*)user_data;

	const uuid_vec_t ids = panelp->mFriendsList->getSelectedIDs();
	if(!ids.empty())
	{	
		LLAvatarActions::pay(ids[0]);
	}
}
void LLFloaterReporter::callbackAvatarID(const uuid_vec_t& ids, const std::vector<LLAvatarName>& names)
{
	if (ids.empty() || names.empty()) return;

	getChild<LLUICtrl>("abuser_name_edit")->setValue(names[0].getCompleteName());
		
	mAbuserID = ids[0];

	refresh();

}
예제 #9
0
void LLFloaterReporter::callbackAvatarID(const std::vector<std::string>& names, const uuid_vec_t& ids)
{
	if (ids.empty() || names.empty()) return;

	childSetText("abuser_name_edit", names[0] );

	mAbuserID = ids[0];

	refresh();

}
예제 #10
0
// static
void LLPanelFriends::onClickProfile(void* user_data)
{
	LLPanelFriends* panelp = (LLPanelFriends*)user_data;

	//llinfos << "LLPanelFriends::onClickProfile()" << llendl;
	const uuid_vec_t ids = panelp->mFriendsList->getSelectedIDs();
	if(!ids.empty())
	{
		LLAvatarActions::showProfile(ids[0]);
	}
}
void LLFloaterReporter::callbackAvatarID(const uuid_vec_t& ids, const std::vector<LLAvatarName>& names)
{
	if (ids.empty() || names.empty()) return;

	if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMES) || gRlvHandler.hasBehaviour(RLV_BHVR_SHOWNAMETAGS))
		getChild<LLUICtrl>("abuser_name_edit")->setValue(RlvStrings::getString(RLV_STRING_HIDDEN));
	else
		getChild<LLUICtrl>("abuser_name_edit")->setValue(names[0].getCompleteName());
		
	mAbuserID = ids[0];

	refresh();

}
예제 #12
0
void LLFloaterReporter::callbackAvatarID(const uuid_vec_t& ids, const std::vector<LLAvatarName>& names)
{
	if (ids.empty() || names.empty()) return;

	// this should never be called in a bug report but here for safety.
	if ( mReportType != BUG_REPORT )
	{
		childSetText("abuser_name_edit", names[0].getCompleteName() );
		
		mAbuserID = ids[0];

		refresh();
	};
}
void LLFloaterSellLandUI::callbackAvatarPick(const uuid_vec_t& ids, const std::vector<LLAvatarName> names)
{	
	LLParcel* parcel = mParcelSelection->getParcel();

	if (names.empty() || ids.empty()) return;
	
	LLUUID id = ids[0];
	parcel->setAuthorizedBuyerID(id);

	mAuthorizedBuyer = ids[0];

	getChild<LLUICtrl>("sell_to_agent")->setValue(names[0].getCompleteName());

	refreshUI();
}
예제 #14
0
void LLPanelFriends::updateFriends(U32 changed_mask)
{
	LLUUID selected_id;
	LLCtrlListInterface *friends_list = childGetListInterface("friend_list");
	if (!friends_list) return;
	LLCtrlScrollInterface *friends_scroll = childGetScrollInterface("friend_list");
	if (!friends_scroll) return;
	
	// We kill the selection warning, otherwise we'll spam with warning popups
	// if the maximum amount of friends are selected
	mShowMaxSelectWarning = false;

	const uuid_vec_t selected_friends = mFriendsList->getSelectedIDs();
	if(changed_mask & (LLFriendObserver::ADD | LLFriendObserver::REMOVE | LLFriendObserver::ONLINE))
	{
		refreshNames(changed_mask);
	}
	else if(changed_mask & LLFriendObserver::POWERS)
	{
		--mNumRightsChanged;
		if(mNumRightsChanged > 0)
		{
			mPeriod = RIGHTS_CHANGE_TIMEOUT;	
			mEventTimer.start();
			mAllowRightsChange = FALSE;
		}
		else
		{
			tick();
		}
	}
	if(!selected_friends.empty())
	{
		// only non-null if friends was already found. This may fail,
		// but we don't really care here, because refreshUI() will
		// clean up the interface.
		friends_list->setCurrentByID(selected_id);
		for(uuid_vec_t::const_iterator itr = selected_friends.begin(); itr != selected_friends.end(); ++itr)
		{
			friends_list->setSelectedByValue(*itr, true);
		}
	}

	refreshUI();
	mShowMaxSelectWarning = true;
}
예제 #15
0
void LLPanelFriends::onClickIM(void* user_data)
{
	LLPanelFriends* panelp = (LLPanelFriends*)user_data;

	//llinfos << "LLPanelFriends::onClickIM()" << llendl;
	const uuid_vec_t ids = panelp->mFriendsList->getSelectedIDs();
	if(!ids.empty())
	{
		if(ids.size() == 1)
		{
			LLAvatarActions::startIM(ids[0]);
		}
		else
		{
			LLAvatarActions::startConference(ids);
		}
	}
}
예제 #16
0
// static
void LLPanelPeople::onAvatarPicked(const uuid_vec_t& ids, const std::vector<LLAvatarName> names)
{
	if (!names.empty() && !ids.empty())
		LLAvatarActions::requestFriendshipDialog(ids[0], names[0].getCompleteName());
}