Feature Request: If web profiles are available and are not shown by default, offer a menu entry to show them from avatar lists
This commit is contained in:
@@ -9312,6 +9312,15 @@ class ListEnableOfferTeleport : public view_listener_t
|
||||
}
|
||||
};
|
||||
|
||||
class ListVisibleWebProfile : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
gMenuHolder->findControl(userdata["control"].asString())->setValue(get_focused_list_num_selected() && !(gSavedSettings.getBOOL("UseWebProfiles") || gSavedSettings.getString("WebProfileURL").empty()));
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class ListCopyUUIDs : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
@@ -9384,6 +9393,15 @@ class ListShowProfile : public view_listener_t
|
||||
}
|
||||
};
|
||||
|
||||
class ListShowWebProfile : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
LLAvatarActions::showProfiles(get_focused_list_ids_selected(), true);
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
class ListStartAdhocCall : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
@@ -9830,6 +9848,7 @@ void initialize_menus()
|
||||
addMenu(new ListEnableIsNotFriend(), "List.EnableIsNotFriend");
|
||||
addMenu(new ListEnableMute(), "List.EnableMute");
|
||||
addMenu(new ListEnableOfferTeleport(), "List.EnableOfferTeleport");
|
||||
addMenu(new ListVisibleWebProfile(), "List.VisibleWebProfile");
|
||||
addMenu(new ListCopyUUIDs(), "List.CopyUUIDs");
|
||||
addMenu(new ListInviteToGroup(), "List.InviteToGroup");
|
||||
addMenu(new ListOfferTeleport(), "List.OfferTeleport");
|
||||
@@ -9838,6 +9857,7 @@ void initialize_menus()
|
||||
addMenu(new ListRequestFriendship(), "List.RequestFriendship");
|
||||
addMenu(new ListRequestTeleport(), "List.RequestTeleport");
|
||||
addMenu(new ListShowProfile(), "List.ShowProfile");
|
||||
addMenu(new ListShowWebProfile(), "List.ShowWebProfile");
|
||||
addMenu(new ListStartAdhocCall(), "List.StartAdhocCall");
|
||||
addMenu(new ListStartCall(), "List.StartCall");
|
||||
addMenu(new ListStartConference(), "List.StartConference");
|
||||
|
||||
@@ -4,6 +4,10 @@
|
||||
<on_click function="List.ShowProfile"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Web Profile" name="Web Profile">
|
||||
<on_click function="List.ShowWebProfile"/>
|
||||
<on_visible function="List.VisibleWebProfile"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Pay" name="Pay">
|
||||
<on_click function="List.Pay"/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
<on_click function="List.ShowProfile"/>
|
||||
<on_enable function="List.EnableAnySelected"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Web Profile" name="Web Profile">
|
||||
<on_click function="List.ShowWebProfile"/>
|
||||
<on_visible function="List.VisibleWebProfile"/>
|
||||
</menu_item_call>
|
||||
<menu_item_call label="Pay" name="Pay">
|
||||
<on_click function="List.Pay"/>
|
||||
<on_enable function="List.EnableSingleSelected"/>
|
||||
|
||||
Reference in New Issue
Block a user