diff options
author | Loren Shih <seraph@lindenlab.com> | 2009-11-23 18:10:37 -0500 |
---|---|---|
committer | Loren Shih <seraph@lindenlab.com> | 2009-11-23 18:10:37 -0500 |
commit | e11d1c1d2b437b7b6d8ba0d0514f050b5d60b221 (patch) | |
tree | 56751a323a6a97cf2f719a2bcdcc2432ab2f7d5d /indra/newview/llinventorybridge.cpp | |
parent | 2b54c8a084a3f387d6f15b9d4f61d8cb68b434e0 (diff) |
EXT-2705 : Remove (dont' just grey out) right-click context menu options for Links that aren't necessary
--HG--
branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rw-r--r-- | indra/newview/llinventorybridge.cpp | 62 |
1 files changed, 29 insertions, 33 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index db079de593..50dbe8af96 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -509,28 +509,39 @@ void LLInvFVBridge::getClipboardEntries(bool show_asset_id, std::vector<std::string> &items,
std::vector<std::string> &disabled_items, U32 flags)
{
- items.push_back(std::string("Rename"));
- if (!isItemRenameable() || (flags & FIRST_SELECTED_ITEM) == 0)
- {
- disabled_items.push_back(std::string("Rename"));
- }
-
- if (show_asset_id)
+ const LLInventoryObject *obj = getInventoryObject();
+ if (obj && obj->getIsLinkType())
{
- items.push_back(std::string("Copy Asset UUID"));
- if ( (! ( isItemPermissive() || gAgent.isGodlike() ) )
- || (flags & FIRST_SELECTED_ITEM) == 0)
+ items.push_back(std::string("Find Original"));
+ if (LLAssetType::lookupIsLinkType(obj->getType()))
{
- disabled_items.push_back(std::string("Copy Asset UUID"));
+ disabled_items.push_back(std::string("Find Original"));
}
}
-
- items.push_back(std::string("Copy Separator"));
-
- items.push_back(std::string("Copy"));
- if (!isItemCopyable())
+ else
{
- disabled_items.push_back(std::string("Copy"));
+ items.push_back(std::string("Rename"));
+ if (!isItemRenameable() || (flags & FIRST_SELECTED_ITEM) == 0)
+ {
+ disabled_items.push_back(std::string("Rename"));
+ }
+
+ if (show_asset_id)
+ {
+ items.push_back(std::string("Copy Asset UUID"));
+ if ( (! ( isItemPermissive() || gAgent.isGodlike() ) )
+ || (flags & FIRST_SELECTED_ITEM) == 0)
+ {
+ disabled_items.push_back(std::string("Copy Asset UUID"));
+ }
+ }
+ items.push_back(std::string("Copy Separator"));
+
+ items.push_back(std::string("Copy"));
+ if (!isItemCopyable())
+ {
+ disabled_items.push_back(std::string("Copy"));
+ }
}
items.push_back(std::string("Paste"));
@@ -3707,11 +3718,6 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) }
else
{
- LLInventoryItem* item = getItem();
- if (item && item->getIsLinkType())
- {
- items.push_back(std::string("Find Original"));
- }
items.push_back(std::string("Open"));
items.push_back(std::string("Properties"));
@@ -4031,14 +4037,9 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) }
else
{
- LLInventoryItem* item = getItem();
- if (item && item->getIsLinkType())
- {
- items.push_back(std::string("Find Original"));
- }
-
items.push_back(std::string("Properties"));
+ LLInventoryItem *item = getItem();
getClipboardEntries(true, items, disabled_items, flags);
LLObjectBridge::sContextMenuItemID = mUUID;
@@ -4469,11 +4470,6 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) items.push_back(std::string("Open"));
}
- if (item && item->getIsLinkType())
- {
- items.push_back(std::string("Find Original"));
- }
-
items.push_back(std::string("Properties"));
getClipboardEntries(true, items, disabled_items, flags);
|