Add invite to group to the avatar list menus

This commit is contained in:
Inusaito Sayori
2013-07-31 12:44:18 -04:00
parent 246449192f
commit 9676eac3db
3 changed files with 20 additions and 0 deletions

View File

@@ -9316,6 +9316,17 @@ class ListCopyUUIDs : public view_listener_t
}
};
class ListInviteToGroup : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLScrollListCtrl* list = get_focused_list();
if (!list) return false;
LLAvatarActions::inviteToGroup(list->getStringUUIDSelectedItem());
return true;
}
};
class ListOfferTeleport : public view_listener_t
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
@@ -9837,6 +9848,7 @@ void initialize_menus()
addMenu(new ListEnableMute(), "List.EnableMute");
addMenu(new ListEnableOfferTeleport(), "List.EnableOfferTeleport");
addMenu(new ListCopyUUIDs(), "List.CopyUUIDs");
addMenu(new ListInviteToGroup(), "List.InviteToGroup");
addMenu(new ListOfferTeleport(), "List.OfferTeleport");
addMenu(new ListPay(), "List.Pay");
addMenu(new ListRemoveFriend(), "List.RemoveFriend");

View File

@@ -36,6 +36,10 @@
<on_enable function="List.EnableSingleSelected"/>
<on_visible function="List.EnableIsFriend"/>
</menu_item_call>
<menu_item_call label="Invite To Group" name="Invite To Group">
<on_click function="List.InviteToGroup"/>
<on_visible function="List.EnableSingleSelected"/>
</menu_item_call>
<menu_item_call label="Offer Teleport" name="Offer Teleport">
<on_click function="List.OfferTeleport"/>
<on_enable function="List.EnableAnySelected"/>

View File

@@ -37,6 +37,10 @@
<on_enable function="List.EnableSingleSelected"/>
<on_visible function="List.EnableIsFriend"/>
</menu_item_call>
<menu_item_call label="Invite To Group" name="Invite To Group">
<on_click function="List.InviteToGroup"/>
<on_visible function="List.EnableSingleSelected"/>
</menu_item_call>
<menu_item_call label="Offer Teleport" name="Offer Teleport">
<on_click function="List.OfferTeleport"/>
<on_enable function="List.EnableAnySelected"/>