Add Ban From Group option to right click menu of avatar lists.
Also missed two touchups for the Responder API merge in llfloaterperms.cpp
This commit is contained in:
@@ -37,6 +37,7 @@
|
||||
#include "llagent.h"
|
||||
#include "llcallingcard.h" // for LLAvatarTracker
|
||||
#include "llfloateravatarinfo.h"
|
||||
#include "llfloatergroupbulkban.h"
|
||||
#include "llfloatergroupinvite.h"
|
||||
#include "llfloatergroups.h"
|
||||
#include "llfloaterwebprofile.h"
|
||||
@@ -747,6 +748,24 @@ bool LLAvatarActions::handlePay(const LLSD& notification, const LLSD& response,
|
||||
return false;
|
||||
}
|
||||
|
||||
// <singu> Ban from group functions
|
||||
void callback_ban_from_group(const LLUUID& group, uuid_vec_t& ids)
|
||||
{
|
||||
LLFloaterGroupBulkBan::showForGroup(group, &ids);
|
||||
}
|
||||
|
||||
void ban_from_group(const uuid_vec_t& ids)
|
||||
{
|
||||
if (LLFloaterGroupPicker* widget = LLFloaterGroupPicker::showInstance(ids.front())) // It'd be cool if LLSD could be formed from uuid_vec_t
|
||||
{
|
||||
widget->center();
|
||||
widget->setPowersMask(GP_GROUP_BAN_ACCESS);
|
||||
widget->removeNoneOption();
|
||||
widget->setSelectGroupCallback(boost::bind(callback_ban_from_group, _1, ids));
|
||||
}
|
||||
}
|
||||
// </singu>
|
||||
|
||||
// static
|
||||
void LLAvatarActions::callback_invite_to_group(LLUUID group_id, LLUUID id)
|
||||
{
|
||||
|
||||
@@ -234,8 +234,8 @@ private:
|
||||
void httpFailure(void)
|
||||
{
|
||||
// <singu> Prevent 404s from annoying the user all the tme
|
||||
if (status == HTTP_NOT_FOUND)
|
||||
LL_INFOS("FloaterPermsResponder") << "Failed to send default permissions to simulator. 404, reason: " << reason << LL_ENDL;
|
||||
if (mStatus == HTTP_NOT_FOUND)
|
||||
LL_INFOS("FloaterPermsResponder") << "Failed to send default permissions to simulator. 404, reason: " << mReason << LL_ENDL;
|
||||
else
|
||||
// </singu>
|
||||
// Do not display the same error more than once in a row
|
||||
|
||||
@@ -9012,6 +9012,16 @@ class ListVisibleWebProfile : public view_listener_t
|
||||
}
|
||||
};
|
||||
|
||||
void ban_from_group(const uuid_vec_t& ids);
|
||||
class ListBanFromGroup : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
ban_from_group(get_focused_list_ids_selected());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class ListCopySLURL : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
@@ -9528,6 +9538,7 @@ void initialize_menus()
|
||||
addMenu(new ListEnableMute(), "List.EnableMute");
|
||||
addMenu(new ListEnableOfferTeleport(), "List.EnableOfferTeleport");
|
||||
addMenu(new ListVisibleWebProfile(), "List.VisibleWebProfile");
|
||||
addMenu(new ListBanFromGroup(), "List.BanFromGroup");
|
||||
addMenu(new ListCopySLURL(), "List.CopySLURL");
|
||||
addMenu(new ListCopyUUIDs(), "List.CopyUUIDs");
|
||||
addMenu(new ListInviteToGroup(), "List.InviteToGroup");
|
||||
|
||||
@@ -44,6 +44,10 @@
|
||||
<on_click function="List.InviteToGroup"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Ban From Group" name="Ban From Group">
|
||||
<on_click function="List.BanFromGroup"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Offer Teleport" name="Offer Teleport">
|
||||
<on_click function="List.OfferTeleport"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
|
||||
@@ -45,6 +45,10 @@
|
||||
<on_click function="List.InviteToGroup"/>
|
||||
<on_visible function="List.EnableSingleSelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Ban From Group" name="Ban From Group">
|
||||
<on_click function="List.BanFromGroup"/>
|
||||
<on_visible function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Offer Teleport" name="Offer Teleport">
|
||||
<on_click function="List.OfferTeleport"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
|
||||
Reference in New Issue
Block a user