From b59ac959fcf2f1f0435f965d2c7279f529f1ce5c Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 27 Apr 2017 19:19:11 +0200 Subject: MAINT-6519 Contribution, adds feature to replace inventory links --- indra/newview/llinventorybridge.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 555c19baac..bf4a2301ae 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -851,6 +851,7 @@ void LLInvFVBridge::buildContextMenu(LLMenuGL& menu, U32 flags) getClipboardEntries(true, items, disabled_items, flags); } + addLinkReplaceMenuOption(items, disabled_items); hide_context_entries(menu, items, disabled_items); } @@ -1051,6 +1052,20 @@ void LLInvFVBridge::addMarketplaceContextMenuOptions(U32 flags, items.push_back(std::string("Marketplace Listings Separator")); } +void LLInvFVBridge::addLinkReplaceMenuOption(menuentry_vec_t& items, menuentry_vec_t& disabled_items) +{ + const LLInventoryObject* obj = getInventoryObject(); + + if (isAgentInventory() && obj && obj->getType() != LLAssetType::AT_CATEGORY && obj->getType() != LLAssetType::AT_LINK_FOLDER) + { + items.push_back(std::string("Replace Links")); + + if (mRoot->getSelectedCount() != 1) + { + disabled_items.push_back(std::string("Replace Links")); + } + } +} // *TODO: remove this BOOL LLInvFVBridge::startDrag(EDragAndDropType* type, LLUUID* id) const @@ -5179,6 +5194,7 @@ void LLTextureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) disabled_items.push_back(std::string("Save As")); } } + addLinkReplaceMenuOption(items, disabled_items); hide_context_entries(menu, items, disabled_items); } @@ -5251,6 +5267,7 @@ void LLSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags) items.push_back(std::string("Sound Play")); } + addLinkReplaceMenuOption(items, disabled_items); hide_context_entries(menu, items, disabled_items); } @@ -5339,6 +5356,7 @@ void LLLandmarkBridge::buildContextMenu(LLMenuGL& menu, U32 flags) disabled_items.push_back(std::string("About Landmark")); } + addLinkReplaceMenuOption(items, disabled_items); hide_context_entries(menu, items, disabled_items); } @@ -5641,6 +5659,7 @@ void LLCallingCardBridge::buildContextMenu(LLMenuGL& menu, U32 flags) disabled_items.push_back(std::string("Conference Chat")); } } + addLinkReplaceMenuOption(items, disabled_items); hide_context_entries(menu, items, disabled_items); } @@ -5910,6 +5929,7 @@ void LLGestureBridge::buildContextMenu(LLMenuGL& menu, U32 flags) items.push_back(std::string("Activate")); } } + addLinkReplaceMenuOption(items, disabled_items); hide_context_entries(menu, items, disabled_items); } @@ -5967,6 +5987,7 @@ void LLAnimationBridge::buildContextMenu(LLMenuGL& menu, U32 flags) items.push_back(std::string("Animation Audition")); } + addLinkReplaceMenuOption(items, disabled_items); hide_context_entries(menu, items, disabled_items); } @@ -6283,6 +6304,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } } } + addLinkReplaceMenuOption(items, disabled_items); hide_context_entries(menu, items, disabled_items); } @@ -6511,6 +6533,7 @@ void LLWearableBridge::buildContextMenu(LLMenuGL& menu, U32 flags) } } } + addLinkReplaceMenuOption(items, disabled_items); hide_context_entries(menu, items, disabled_items); } @@ -6682,6 +6705,7 @@ void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags) items.push_back(std::string("Properties")); addDeleteContextMenuOptions(items, disabled_items); } + addLinkReplaceMenuOption(items, disabled_items); hide_context_entries(menu, items, disabled_items); } @@ -6733,6 +6757,7 @@ void LLMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags) getClipboardEntries(true, items, disabled_items, flags); } + addLinkReplaceMenuOption(items, disabled_items); hide_context_entries(menu, items, disabled_items); } -- cgit v1.2.3 From 8e6d54e7b90befda29dcb4f1ffb83ae6e60d0f97 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Thu, 11 May 2017 17:18:43 +0300 Subject: MAINT-7403 Disallow emptying Trash while in the Recent tab of Inventory --- indra/newview/llinventorybridge.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index bf4a2301ae..e944e3830f 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3870,6 +3870,13 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items } if(trash_id == mUUID) { + bool is_recent_panel = false; + LLInventoryPanel *active_panel = LLInventoryPanel::getActiveInventoryPanel(FALSE); + if (active_panel && (active_panel->getName() == "Recent Items")) + { + is_recent_panel = true; + } + // This is the trash. items.push_back(std::string("Empty Trash")); @@ -3877,7 +3884,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items LLInventoryModel::item_array_t* item_array; gInventory.getDirectDescendentsOf(mUUID, cat_array, item_array); // Enable Empty menu item only when there is something to act upon. - if (0 == cat_array->size() && 0 == item_array->size()) + if ((0 == cat_array->size() && 0 == item_array->size()) || is_recent_panel) { disabled_items.push_back(std::string("Empty Trash")); } -- cgit v1.2.3 From 424b30ee3e71443cee3b69c6a492009406c89558 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 16 May 2017 18:03:25 +0300 Subject: MAINT-7414 FIXED Confirmation is not shown when removing multiple items at once when above InventoryTrashMaxCapacity limit --- indra/newview/llinventorybridge.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index e944e3830f..1b32fc9dfe 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -391,6 +391,7 @@ void LLInvFVBridge::removeBatch(std::vector& batch) } } removeBatchNoCheck(batch); + model->checkTrashOverflow(); } void LLInvFVBridge::removeBatchNoCheck(std::vector& batch) -- cgit v1.2.3