Allow right clicking avatar lists with multiple avatars selected to invite to group.
This commit is contained in:
@@ -687,13 +687,18 @@ bool LLAvatarActions::canOfferTeleport(const uuid_vec_t& ids)
|
||||
|
||||
void LLAvatarActions::inviteToGroup(const LLUUID& id)
|
||||
{
|
||||
LLFloaterGroupPicker* widget = LLFloaterGroupPicker::showInstance(LLSD(id));
|
||||
inviteToGroup(uuid_vec_t(1, id));
|
||||
}
|
||||
|
||||
void LLAvatarActions::inviteToGroup(const uuid_vec_t& ids)
|
||||
{
|
||||
LLFloaterGroupPicker* widget = LLFloaterGroupPicker::showInstance(LLSD(ids.front()));
|
||||
if (widget)
|
||||
{
|
||||
widget->center();
|
||||
widget->setPowersMask(GP_MEMBER_INVITE);
|
||||
widget->removeNoneOption();
|
||||
widget->setSelectGroupCallback(boost::bind(callback_invite_to_group, _1, id));
|
||||
widget->setSelectGroupCallback(boost::bind(callback_invite_to_group, _1, ids));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -767,11 +772,8 @@ void ban_from_group(const uuid_vec_t& ids)
|
||||
// </singu>
|
||||
|
||||
// static
|
||||
void LLAvatarActions::callback_invite_to_group(LLUUID group_id, LLUUID id)
|
||||
void LLAvatarActions::callback_invite_to_group(LLUUID group_id, uuid_vec_t& agent_ids)
|
||||
{
|
||||
uuid_vec_t agent_ids;
|
||||
agent_ids.push_back(id);
|
||||
|
||||
LLFloaterGroupInvite::showForGroup(group_id, &agent_ids);
|
||||
}
|
||||
|
||||
|
||||
@@ -155,6 +155,7 @@ public:
|
||||
* Invite avatar to a group.
|
||||
*/
|
||||
static void inviteToGroup(const LLUUID& id);
|
||||
static void inviteToGroup(const uuid_vec_t& ids);
|
||||
|
||||
/**
|
||||
* Kick avatar off grid
|
||||
@@ -217,7 +218,7 @@ private:
|
||||
static bool handleKick(const LLSD& notification, const LLSD& response);
|
||||
static bool handleFreeze(const LLSD& notification, const LLSD& response);
|
||||
static bool handleUnfreeze(const LLSD& notification, const LLSD& response);
|
||||
static void callback_invite_to_group(LLUUID group_id, LLUUID id);
|
||||
static void callback_invite_to_group(LLUUID group_id, uuid_vec_t& ids);
|
||||
static void on_avatar_name_cache_teleport_request(const LLUUID& id, const LLAvatarName& av_name);
|
||||
|
||||
public:
|
||||
|
||||
@@ -473,7 +473,7 @@ BOOL LLPanelAvatarSecondLife::postBuild(void)
|
||||
|
||||
getChild<LLUICtrl>("Find on Map")->setCommitCallback(boost::bind(LLAvatarActions::showOnMap, boost::bind(&LLPanelAvatar::getAvatarID, pa)));
|
||||
getChild<LLUICtrl>("Instant Message...")->setCommitCallback(boost::bind(LLAvatarActions::startIM, boost::bind(&LLPanelAvatar::getAvatarID, pa)));
|
||||
getChild<LLUICtrl>("GroupInvite_Button")->setCommitCallback(boost::bind(LLAvatarActions::inviteToGroup, boost::bind(&LLPanelAvatar::getAvatarID, pa)));
|
||||
getChild<LLUICtrl>("GroupInvite_Button")->setCommitCallback(boost::bind(static_cast<void(*)(const LLUUID&)>(LLAvatarActions::inviteToGroup), boost::bind(&LLPanelAvatar::getAvatarID, pa)));
|
||||
|
||||
getChild<LLUICtrl>("Add Friend...")->setCommitCallback(boost::bind(LLAvatarActions::requestFriendshipDialog, boost::bind(&LLPanelAvatar::getAvatarID, pa)));
|
||||
getChild<LLUICtrl>("Pay...")->setCommitCallback(boost::bind(LLAvatarActions::pay, boost::bind(&LLPanelAvatar::getAvatarID, pa)));
|
||||
|
||||
@@ -9052,7 +9052,7 @@ class ListInviteToGroup : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLAvatarActions::inviteToGroup(get_focused_list_id_selected());
|
||||
LLAvatarActions::inviteToGroup(get_focused_list_ids_selected());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Invite To Group" name="Invite To Group">
|
||||
<on_click function="List.InviteToGroup"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Ban From Group" name="Ban From Group">
|
||||
<on_click function="List.BanFromGroup"/>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Invite To Group" name="Invite To Group">
|
||||
<on_click function="List.InviteToGroup"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Offer Teleport" name="Offer Teleport">
|
||||
<on_click function="List.OfferTeleport"/>
|
||||
|
||||
Reference in New Issue
Block a user