From c23b6f14615aa09c2ed43c71c21ed732f628442c Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 22 Apr 2019 19:39:21 +0300 Subject: SL-8012 Remove Mesh Filter Option on Inventory --- indra/newview/llinventorybridge.cpp | 59 -------------- indra/newview/llinventorybridge.h | 28 ------- indra/newview/llinventorymodel.cpp | 8 -- indra/newview/llpanelmaininventory.cpp | 9 --- indra/newview/llpanelobjectinventory.cpp | 91 ---------------------- .../xui/en/floater_inventory_view_finder.xml | 39 +++------- 6 files changed, 11 insertions(+), 223 deletions(-) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index e13f8343a0..8c1769e16a 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1399,13 +1399,6 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, // Only should happen for broken links. new_listener = new LLLinkItemBridge(inventory, root, uuid); break; - case LLAssetType::AT_MESH: - if(!(inv_type == LLInventoryType::IT_MESH)) - { - LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL; - } - new_listener = new LLMeshBridge(inventory, root, uuid); - break; case LLAssetType::AT_UNKNOWN: new_listener = new LLUnknownItemBridge(inventory, root, uuid); break; @@ -6832,58 +6825,6 @@ void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags) hide_context_entries(menu, items, disabled_items); } -// +=================================================+ -// | LLMeshBridge | -// +=================================================+ - -LLUIImagePtr LLMeshBridge::getIcon() const -{ - return LLInventoryIcon::getIcon(LLAssetType::AT_MESH, LLInventoryType::IT_MESH, 0, FALSE); -} - -void LLMeshBridge::openItem() -{ - LLViewerInventoryItem* item = getItem(); - - if (item) - { - // open mesh - } -} - -void LLMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags) -{ - LL_DEBUGS() << "LLMeshBridge::buildContextMenu()" << LL_ENDL; - std::vector items; - std::vector disabled_items; - - if(isItemInTrash()) - { - items.push_back(std::string("Purge Item")); - if (!isItemRemovable()) - { - disabled_items.push_back(std::string("Purge Item")); - } - - items.push_back(std::string("Restore Item")); - } - else if (isMarketplaceListingsFolder()) - { - addMarketplaceContextMenuOptions(flags, items, disabled_items); - items.push_back(std::string("Properties")); - getClipboardEntries(false, items, disabled_items, flags); - } - else - { - items.push_back(std::string("Properties")); - - getClipboardEntries(true, items, disabled_items, flags); - } - - addLinkReplaceMenuOption(items, disabled_items); - hide_context_entries(menu, items, disabled_items); -} - // +=================================================+ // | LLLinkBridge | diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index ce06e8fffc..f4df566fa6 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -603,23 +603,6 @@ protected: static std::string sPrefix; }; - -class LLMeshBridge : public LLItemBridge -{ - friend class LLInvFVBridge; -public: - virtual LLUIImagePtr getIcon() const; - virtual void openItem(); - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); - -protected: - LLMeshBridge(LLInventoryPanel* inventory, - LLFolderView* root, - const LLUUID& uuid) : - LLItemBridge(inventory, root, uuid) {} -}; - - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Class LLInvFVBridgeAction // @@ -650,17 +633,6 @@ protected: LLInventoryModel* mModel; }; -class LLMeshBridgeAction: public LLInvFVBridgeAction -{ - friend class LLInvFVBridgeAction; -public: - virtual void doIt() ; - virtual ~LLMeshBridgeAction(){} -protected: - LLMeshBridgeAction(const LLUUID& id,LLInventoryModel* model):LLInvFVBridgeAction(id,model){} - -}; - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Recent Inventory Panel related classes diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp index b140c7c38e..c49d61df31 100644 --- a/indra/newview/llinventorymodel.cpp +++ b/indra/newview/llinventorymodel.cpp @@ -888,14 +888,6 @@ U32 LLInventoryModel::updateItem(const LLViewerInventoryItem* item, U32 mask) return mask; } - // We're hiding mesh types -#if 0 - if (item->getType() == LLAssetType::AT_MESH) - { - return mask; - } -#endif - LLPointer old_item = getItem(item->getUUID()); LLPointer new_item; if(old_item) diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index db9d61c637..495e205252 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -898,7 +898,6 @@ void LLFloaterInventoryFinder::updateElementsFromFilter() getChild("check_clothing")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_WEARABLE)); getChild("check_gesture")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_GESTURE)); getChild("check_landmark")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_LANDMARK)); - getChild("check_mesh")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_MESH)); getChild("check_notecard")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_NOTECARD)); getChild("check_object")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_OBJECT)); getChild("check_script")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_LSL)); @@ -954,12 +953,6 @@ void LLFloaterInventoryFinder::draw() filtered_by_all_types = FALSE; } - if (!getChild("check_mesh")->getValue()) - { - filter &= ~(0x1 << LLInventoryType::IT_MESH); - filtered_by_all_types = FALSE; - } - if (!getChild("check_notecard")->getValue()) { filter &= ~(0x1 << LLInventoryType::IT_NOTECARD); @@ -1108,7 +1101,6 @@ void LLFloaterInventoryFinder::selectAllTypes(void* user_data) self->getChild("check_clothing")->setValue(TRUE); self->getChild("check_gesture")->setValue(TRUE); self->getChild("check_landmark")->setValue(TRUE); - self->getChild("check_mesh")->setValue(TRUE); self->getChild("check_notecard")->setValue(TRUE); self->getChild("check_object")->setValue(TRUE); self->getChild("check_script")->setValue(TRUE); @@ -1128,7 +1120,6 @@ void LLFloaterInventoryFinder::selectNoTypes(void* user_data) self->getChild("check_clothing")->setValue(FALSE); self->getChild("check_gesture")->setValue(FALSE); self->getChild("check_landmark")->setValue(FALSE); - self->getChild("check_mesh")->setValue(FALSE); self->getChild("check_notecard")->setValue(FALSE); self->getChild("check_object")->setValue(FALSE); self->getChild("check_script")->setValue(FALSE); diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 5aa80651c4..6702dae4d6 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -1121,92 +1121,6 @@ LLUIImagePtr LLTaskWearableBridge::getIcon() const return LLInventoryIcon::getIcon(mAssetType, mInventoryType, mFlags, FALSE ); } -///---------------------------------------------------------------------------- -/// Class LLTaskMeshBridge -///---------------------------------------------------------------------------- - -class LLTaskMeshBridge : public LLTaskInvFVBridge -{ -public: - LLTaskMeshBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name); - - virtual LLUIImagePtr getIcon() const; - virtual void openItem(); - virtual void performAction(LLInventoryModel* model, std::string action); - virtual void buildContextMenu(LLMenuGL& menu, U32 flags); -}; - -LLTaskMeshBridge::LLTaskMeshBridge( - LLPanelObjectInventory* panel, - const LLUUID& uuid, - const std::string& name) : - LLTaskInvFVBridge(panel, uuid, name) -{ -} - -LLUIImagePtr LLTaskMeshBridge::getIcon() const -{ - return LLInventoryIcon::getIcon(LLAssetType::AT_MESH, LLInventoryType::IT_MESH, 0, FALSE); -} - -void LLTaskMeshBridge::openItem() -{ - // open mesh -} - - -// virtual -void LLTaskMeshBridge::performAction(LLInventoryModel* model, std::string action) -{ - if (action == "mesh action") - { - LLInventoryItem* item = findItem(); - if(item) - { - // do action - } - } - LLTaskInvFVBridge::performAction(model, action); -} - -void LLTaskMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags) -{ - LLInventoryItem* item = findItem(); - std::vector items; - std::vector disabled_items; - if(!item) - { - hide_context_entries(menu, items, disabled_items); - return; - } - - items.push_back(std::string("Task Open")); - if (!isItemCopyable()) - { - disabled_items.push_back(std::string("Task Open")); - } - - items.push_back(std::string("Task Properties")); - if ((flags & FIRST_SELECTED_ITEM) == 0) - { - disabled_items.push_back(std::string("Task Properties")); - } - if(isItemRenameable()) - { - items.push_back(std::string("Task Rename")); - } - if(isItemRemovable()) - { - items.push_back(std::string("Task Remove")); - } - - - hide_context_entries(menu, items, disabled_items); -} - ///---------------------------------------------------------------------------- /// LLTaskInvFVBridge impl //---------------------------------------------------------------------------- @@ -1288,11 +1202,6 @@ LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory* object_id, object_name); break; - case LLAssetType::AT_MESH: - new_bridge = new LLTaskMeshBridge(panel, - object_id, - object_name); - break; default: LL_INFOS() << "Unhandled inventory type (llassetstorage.h): " << (S32)type << LL_ENDL; diff --git a/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml b/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml index 1b4992b4ca..ca1d299553 100644 --- a/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml +++ b/indra/newview/skins/default/xui/en/floater_inventory_view_finder.xml @@ -2,7 +2,7 @@ - -