From 4d2bdbb05ac24b4121f05107399fa7be33539f74 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 1 Mar 2023 23:37:05 +0200 Subject: SL-19282 Removed LLInspectTexture floater LLInspectTexture floater appears to be incomplete and doesn't have a function --- indra/newview/llinspecttexture.cpp | 101 --------------------- indra/newview/llinspecttexture.h | 3 - indra/newview/llviewerfloaterreg.cpp | 2 - .../skins/default/xui/en/inspect_texture.xml | 63 ------------- 4 files changed, 169 deletions(-) delete mode 100644 indra/newview/skins/default/xui/en/inspect_texture.xml diff --git a/indra/newview/llinspecttexture.cpp b/indra/newview/llinspecttexture.cpp index 2e8273d6cf..4ec0767c4e 100644 --- a/indra/newview/llinspecttexture.cpp +++ b/indra/newview/llinspecttexture.cpp @@ -25,7 +25,6 @@ #include "llviewerprecompiledheaders.h" -#include "llfloaterreg.h" #include "llinspect.h" #include "llinspecttexture.h" #include "llinventoryfunctions.h" @@ -34,101 +33,6 @@ #include "lltrans.h" #include "llviewertexturelist.h" -// ============================================================================ -// LLInspectTexture class -// - -class LLInspectTexture : public LLInspect -{ - friend class LLFloaterReg; -public: - LLInspectTexture(const LLSD& sdKey); - ~LLInspectTexture(); - -public: - void onOpen(const LLSD& sdData) override; - BOOL postBuild() override; - -public: - const LLUUID& getAssetId() const { return mAssetId; } - const LLUUID& getItemId() const { return mItemId; } - -protected: - LLUUID mAssetId; - LLUUID mItemId; // Item UUID relative to gInventoryModel (or null if not displaying an inventory texture) - LLUUID mNotecardId; - LLTextureCtrl* mTextureCtrl = nullptr; - LLTextBox* mTextureName = nullptr; -}; - -LLInspectTexture::LLInspectTexture(const LLSD& sdKey) - : LLInspect(LLSD()) -{ -} - -LLInspectTexture::~LLInspectTexture() -{ -} - -void LLInspectTexture::onOpen(const LLSD& sdData) -{ - // Start fade animation - LLInspect::onOpen(sdData); - - bool fIsAsset = sdData.has("thumbnail_id"); - bool fIsInventory = sdData.has("item_id"); - - // Skip if we're being asked to display the same thing - const LLUUID idAsset = (fIsAsset) ? sdData["thumbnail_id"].asUUID() : LLUUID::null; - const LLUUID idItem = (fIsInventory) ? sdData["item_id"].asUUID() : LLUUID::null; - if ( (getVisible()) && ( ((fIsAsset) && (idAsset == mAssetId)) || ((fIsInventory) && (idItem == mItemId)) ) ) - { - return; - } - - // Position the inspector relative to the mouse cursor - // Similar to how tooltips are positioned [see LLToolTipMgr::createToolTip()] - if (sdData.has("pos")) - LLUI::instance().positionViewNearMouse(this, sdData["pos"]["x"].asInteger(), sdData["pos"]["y"].asInteger()); - else - LLUI::instance().positionViewNearMouse(this); - - std::string strName = sdData["name"].asString(); - if (fIsAsset) - { - mAssetId = idAsset; - mItemId = idItem; // Will be non-null in the case of a notecard - mNotecardId = sdData["notecard_id"].asUUID(); - } - else if (fIsInventory) - { - const LLViewerInventoryItem* pItem = gInventory.getItem(idItem); - if ( (pItem) && (LLAssetType::AT_TEXTURE == pItem->getType()) ) - { - if (strName.empty()) - strName = pItem->getName(); - mAssetId = pItem->getAssetUUID(); - mItemId = idItem; - } - else - { - mAssetId.setNull(); - mItemId.setNull(); - } - mNotecardId = LLUUID::null; - } - - mTextureCtrl->setImageAssetID(mAssetId); - mTextureName->setText(strName); -} - -BOOL LLInspectTexture::postBuild() -{ - mTextureCtrl = getChild("texture_ctrl"); - mTextureName = getChild("texture_name"); - - return TRUE; -} // ============================================================================ // Helper functions @@ -202,11 +106,6 @@ LLToolTip* LLInspectTextureUtil::createInventoryToolTip(LLToolTip::Params p) } } -void LLInspectTextureUtil::registerFloater() -{ - LLFloaterReg::add("inspect_texture", "inspect_texture.xml", &LLFloaterReg::build); -} - // ============================================================================ // LLTexturePreviewView helper class // diff --git a/indra/newview/llinspecttexture.h b/indra/newview/llinspecttexture.h index 192aafc3b4..ff0d80b825 100644 --- a/indra/newview/llinspecttexture.h +++ b/indra/newview/llinspecttexture.h @@ -32,9 +32,6 @@ class LLTexturePreviewView; namespace LLInspectTextureUtil { LLToolTip* createInventoryToolTip(LLToolTip::Params p); - - // Register with LLFloaterReg - void registerFloater(); } class LLTextureToolTip : public LLToolTip diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 581c6779ab..36cfefdbb2 100644 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -154,7 +154,6 @@ #include "llinspectgroup.h" #include "llinspectobject.h" #include "llinspectremoteobject.h" -#include "llinspecttexture.h" #include "llinspecttoast.h" #include "llmoveview.h" #include "llfloaterimnearbychat.h" @@ -378,7 +377,6 @@ void LLViewerFloaterReg::registerFloaters() LLInspectAvatarUtil::registerFloater(); LLInspectGroupUtil::registerFloater(); LLInspectObjectUtil::registerFloater(); - LLInspectTextureUtil::registerFloater(); LLInspectRemoteObjectUtil::registerFloater(); LLFloaterVoiceVolumeUtil::registerFloater(); LLNotificationsUI::registerFloater(); diff --git a/indra/newview/skins/default/xui/en/inspect_texture.xml b/indra/newview/skins/default/xui/en/inspect_texture.xml deleted file mode 100644 index 30be90cfa0..0000000000 --- a/indra/newview/skins/default/xui/en/inspect_texture.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - -