From 9df7808dc81dbf2b7d47296140cc4c4070bd8b70 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Tue, 27 Aug 2013 21:37:08 -0400 Subject: [PATCH] Add Web Profile option to calling card inventory menu Only shown when web profiles are available and web profiles aren't used by default --- indra/newview/llinventorybridge.cpp | 9 +++++++++ indra/newview/skins/default/xui/en-us/menu_inventory.xml | 3 +++ 2 files changed, 12 insertions(+) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 212f953fb..f8e9390da 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4642,6 +4642,13 @@ void LLCallingCardBridge::performAction(LLInventoryModel* model, std::string act LLAvatarActions::teleportRequest(item->getCreatorUUID()); } } + else if ("web_profile" == action) + { + if (LLViewerInventoryItem* item = getItem()) + { + LLAvatarActions::showProfile(item->getCreatorUUID(), true); + } + } else LLItemBridge::performAction(model, action); } @@ -4724,6 +4731,8 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) user_online = (LLAvatarTracker::instance().isBuddyOnline(item->getCreatorUUID())); } items.push_back(std::string("Send Instant Message Separator")); + if (!gSavedSettings.getString("WebProfileURL").empty() && !gSavedSettings.getBOOL("UseWebProfiles")) + items.push_back(std::string("Web Profile")); items.push_back(std::string("Send Instant Message")); items.push_back(std::string("Offer Teleport...")); items.push_back(std::string("Request Teleport...")); diff --git a/indra/newview/skins/default/xui/en-us/menu_inventory.xml b/indra/newview/skins/default/xui/en-us/menu_inventory.xml index de5537571..886c34984 100644 --- a/indra/newview/skins/default/xui/en-us/menu_inventory.xml +++ b/indra/newview/skins/default/xui/en-us/menu_inventory.xml @@ -273,6 +273,9 @@ + + +