From 8365945f8af6e27e7180b40aae79f210f99bb7c8 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 8 Jun 2018 16:40:01 -0700 Subject: Settings inventory picker. --- indra/newview/llpanelobjectinventory.cpp | 35 ++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'indra/newview/llpanelobjectinventory.cpp') diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index c50f3477ad..f180a63497 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -145,6 +145,7 @@ public: virtual bool hasChildren() const { return FALSE; } virtual LLInventoryType::EType getInventoryType() const { return LLInventoryType::IT_NONE; } virtual LLWearableType::EType getWearableType() const { return LLWearableType::WT_NONE; } + virtual LLSettingsType::type_e getSettingsType() const { return LLSettingsType::ST_NONE; } virtual EInventorySortGroup getSortGroup() const { return SG_ITEM; } virtual LLInventoryObject* getInventoryObject() const { return findInvObject(); } @@ -1413,6 +1414,34 @@ void LLTaskMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags) hide_context_entries(menu, items, disabled_items); } +///---------------------------------------------------------------------------- +/// Class LLTaskSettingsBridge +///---------------------------------------------------------------------------- + +class LLTaskSettingsBridge : public LLTaskInvFVBridge +{ +public: + LLTaskSettingsBridge(LLPanelObjectInventory* panel, + const LLUUID& uuid, + const std::string& name, + U32 flags) : + LLTaskInvFVBridge(panel, uuid, name, flags) {} + + virtual LLUIImagePtr getIcon() const; + virtual LLSettingsType::type_e getSettingsType() const; +}; + +LLUIImagePtr LLTaskSettingsBridge::getIcon() const +{ + return LLInventoryIcon::getIcon(mAssetType, mInventoryType, mFlags, FALSE); +} + +LLSettingsType::type_e LLTaskSettingsBridge::getSettingsType() const +{ + return LLSettingsType::ST_NONE; +} + + ///---------------------------------------------------------------------------- /// LLTaskInvFVBridge impl //---------------------------------------------------------------------------- @@ -1499,6 +1528,12 @@ LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory* object_id, object_name); break; + case LLAssetType::AT_SETTINGS: + new_bridge = new LLTaskSettingsBridge(panel, + object_id, + object_name, + itemflags); + break; default: LL_INFOS() << "Unhandled inventory type (llassetstorage.h): " << (S32)type << LL_ENDL; -- cgit v1.2.3 From 442bbfed348b0c60f4d8a8da87aa15d3185bde7c Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 20 Jun 2018 12:37:17 -0700 Subject: Adding settings DAD type --- indra/newview/llpanelobjectinventory.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llpanelobjectinventory.cpp') diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index f180a63497..096679d786 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -853,6 +853,7 @@ BOOL LLTaskCategoryBridge::dragOrDrop(MASK mask, BOOL drop, case DAD_GESTURE: case DAD_CALLINGCARD: case DAD_MESH: + case DAD_SETTINGS: accept = LLToolDragAndDrop::isInventoryDropAcceptable(object, (LLViewerInventoryItem*)cargo_data); if(accept && drop) { -- cgit v1.2.3