From 1ccba509a88d80895a5e5c62aa518cd274e43e5a Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Fri, 2 Aug 2013 17:04:48 -0400 Subject: [PATCH] Feature Request: If web profiles are available and are not shown by default, offer a menu entry to show them from avatar lists --- indra/newview/llviewermenu.cpp | 20 +++++++++++++++++++ .../skins/default/xui/en-us/menu_avs_list.xml | 4 ++++ .../skins/default/xui/en-us/menu_radar.xml | 4 ++++ 3 files changed, 28 insertions(+) diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index b9662a584..7be562c63 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -9312,6 +9312,15 @@ class ListEnableOfferTeleport : public view_listener_t } }; +class ListVisibleWebProfile : public view_listener_t +{ + bool handleEvent(LLPointer 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 event, const LLSD& userdata) @@ -9384,6 +9393,15 @@ class ListShowProfile : public view_listener_t } }; +class ListShowWebProfile : public view_listener_t +{ + bool handleEvent(LLPointer event, const LLSD& userdata) + { + LLAvatarActions::showProfiles(get_focused_list_ids_selected(), true); + return true; + } +}; + class ListStartAdhocCall : public view_listener_t { bool handleEvent(LLPointer 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"); diff --git a/indra/newview/skins/default/xui/en-us/menu_avs_list.xml b/indra/newview/skins/default/xui/en-us/menu_avs_list.xml index 63a6a92f2..402c5ca7b 100644 --- a/indra/newview/skins/default/xui/en-us/menu_avs_list.xml +++ b/indra/newview/skins/default/xui/en-us/menu_avs_list.xml @@ -4,6 +4,10 @@ + + + + diff --git a/indra/newview/skins/default/xui/en-us/menu_radar.xml b/indra/newview/skins/default/xui/en-us/menu_radar.xml index 5fbd3d818..2ab9dd73b 100644 --- a/indra/newview/skins/default/xui/en-us/menu_radar.xml +++ b/indra/newview/skins/default/xui/en-us/menu_radar.xml @@ -5,6 +5,10 @@ + + + +