summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2009-12-10 15:31:08 -0500
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2009-12-10 15:31:08 -0500
commit6af53dd7e2e8c344847dd6936181c545db8e8778 (patch)
tree4ab4beb0717dae2bc0e92df91c679731f85deb60 /indra
parent50a865e21222764ad8da0743a6b6efcc09b13ec6 (diff)
For EXT-2858: Determine gear menu / right-click menu choices for AppearanceSP
--HG-- branch : avatar-pipeline
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llinventorybridge.cpp33
-rw-r--r--indra/newview/llinventorybridge.h3
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory.xml4
3 files changed, 19 insertions, 21 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 4e2acf9907..ba72489bd6 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -67,8 +67,6 @@
using namespace LLOldEvents;
-bool isInOutfitsSidePanel(LLPanel *panel);
-
// Helpers
// bug in busy count inc/dec right now, logic is complex... do we really need it?
void inc_busy_count()
@@ -571,11 +569,11 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id,
if (obj && obj->getIsLinkType())
{
- items.push_back(std::string("Remove"));
+ items.push_back(std::string("Remove Link"));
}
items.push_back(std::string("Delete"));
- const bool is_sidepanel = isInOutfitsSidePanel(mInventoryPanel.get());
+ const bool is_sidepanel = isInOutfitsSidePanel();
if ((obj && obj->getIsLinkType() && is_sidepanel) || !isItemRemovable())
{
disabled_items.push_back(std::string("Delete"));
@@ -922,6 +920,16 @@ void LLInvFVBridge::purgeItem(LLInventoryModel *model, const LLUUID &uuid)
}
}
+bool LLInvFVBridge::isInOutfitsSidePanel() const
+{
+ LLInventoryPanel *my_panel = dynamic_cast<LLInventoryPanel*>(mInventoryPanel.get());
+ LLPanelOutfitsInventory *outfit_panel =
+ dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory"));
+ if (!outfit_panel)
+ return false;
+ return outfit_panel->isAccordionPanel(my_panel);
+}
+
// +=================================================+
// | InventoryFVBridgeBuilder |
// +=================================================+
@@ -2395,21 +2403,10 @@ void LLFolderBridge::staticFolderOptionsMenu()
sSelf->folderOptionsMenu();
}
-bool isInOutfitsSidePanel(LLPanel *panel)
-{
- LLInventoryPanel *my_panel = dynamic_cast<LLInventoryPanel*>(panel);
- LLPanelOutfitsInventory *outfit_panel =
- dynamic_cast<LLPanelOutfitsInventory*>(LLSideTray::getInstance()->getPanel("panel_outfits_inventory"));
- if (!outfit_panel)
- return false;
- return outfit_panel->isAccordionPanel(my_panel);
-
- //LLInventoryPanel *outfit_inv_panel = outfit_panel ? outfit_panel->getActivePanel(): NULL;
- //return (my_panel && (my_panel == outfit_inv_panel));
-}
-
void LLFolderBridge::folderOptionsMenu()
{
+ const bool is_sidepanel = isInOutfitsSidePanel();
+
std::vector<std::string> disabled_items;
LLInventoryModel* model = getInventoryModel();
@@ -2421,13 +2418,11 @@ void LLFolderBridge::folderOptionsMenu()
// BAP change once we're no longer treating regular categories as ensembles.
const bool is_ensemble = category && (type == LLFolderType::FT_NONE ||
LLFolderType::lookupIsEnsembleType(type));
- const bool is_sidepanel = isInOutfitsSidePanel(mInventoryPanel.get());
// calling card related functionality for folders.
if (is_sidepanel)
{
- mItems.clear();
mItems.push_back("Rename");
mItems.push_back("Delete");
}
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 63be9dcdb8..4636c1d4cb 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -182,6 +182,9 @@ public:
// LLInvFVBridge functionality
virtual void clearDisplayName() {}
+ // Allow context menus to be customized for side panel.
+ bool isInOutfitsSidePanel() const;
+
protected:
LLInvFVBridge(LLInventoryPanel* inventory, const LLUUID& uuid);
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index 7e8d259cd0..660e3858ac 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -451,9 +451,9 @@
<menu_item_separator
layout="topleft" />
<menu_item_call
- label="Remove"
+ label="Remove Link"
layout="topleft"
- name="Remove">
+ name="Remove Link">
<menu_item_call.on_click
function="Inventory.DoToSelected"
parameter="delete" />