From cbe4cac78cf48cb9144dc2f6c194585cff87a1ce Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 6 Mar 2018 14:58:39 -0800 Subject: Settings type inventory objects and upload the assests. --- indra/newview/llviewertexteditor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewertexteditor.cpp') diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 7d2d6e25c7..f860e3bbbe 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -540,7 +540,9 @@ LLUIImagePtr LLEmbeddedItems::getItemImage(llwchar ext_char) const case LLAssetType::AT_ANIMATION: img_name = "Inv_Animation"; break; case LLAssetType::AT_GESTURE: img_name = "Inv_Gesture"; break; case LLAssetType::AT_MESH: img_name = "Inv_Mesh"; break; - default: img_name = "Inv_Invalid"; break; // use the Inv_Invalid icon for undefined object types (see MAINT-3981) + case LLAssetType::AT_SETTINGS: img_name = "Inv_Settings"; break; + default: img_name = "Inv_Invalid"; break; // use the Inv_Invalid icon for undefined object types (see MAINT-3981) + } return LLUI::getUIImage(img_name); -- 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/llviewertexteditor.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llviewertexteditor.cpp') diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index f860e3bbbe..f828dc04d2 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -868,6 +868,7 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask, case DAD_ANIMATION: case DAD_GESTURE: case DAD_MESH: + case DAD_SETTINGS: { LLInventoryItem *item = (LLInventoryItem *)cargo_data; if( item && allowsEmbeddedItems() ) -- cgit v1.2.3 From 80f98daed9aaf74f2d6fa3da9c1525ebcd4293c2 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 19 Jul 2018 22:27:49 +0300 Subject: MAINT-8842 Should not be able to add Environment Setting Assets to Group Notices on a Non-EEP region --- indra/newview/llviewertexteditor.cpp | 86 ++++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 39 deletions(-) (limited to 'indra/newview/llviewertexteditor.cpp') diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index f828dc04d2..714170a513 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -31,6 +31,7 @@ #include "llagent.h" #include "llaudioengine.h" #include "llavataractions.h" +#include "llenvironment.h" #include "llfloaterreg.h" #include "llfloatersidepanelcontainer.h" #include "llfloaterworldmap.h" @@ -854,8 +855,18 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask, if (getEnabled() && acceptsTextInput()) { + bool supported = false; switch( cargo_type ) { + case DAD_SETTINGS: + { + supported = LLEnvironment::instance().isExtendedEnvironmentEnabled(); + if (!supported && tooltip_msg.empty()) + { + tooltip_msg.assign(LLTrans::getString("TooltipNotecardNotAllowedTypeDrop")); + } + break; + } case DAD_CALLINGCARD: case DAD_TEXTURE: case DAD_SOUND: @@ -868,54 +879,51 @@ BOOL LLViewerTextEditor::handleDragAndDrop(S32 x, S32 y, MASK mask, case DAD_ANIMATION: case DAD_GESTURE: case DAD_MESH: - case DAD_SETTINGS: { - LLInventoryItem *item = (LLInventoryItem *)cargo_data; - if( item && allowsEmbeddedItems() ) + supported = true; + break; + } + + default: + supported = false; + break; + } + + LLInventoryItem *item = (LLInventoryItem *)cargo_data; + if (item && allowsEmbeddedItems() && supported) + { + U32 mask_next = item->getPermissions().getMaskNextOwner(); + if((mask_next & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) + { + if( drop ) { - U32 mask_next = item->getPermissions().getMaskNextOwner(); - if((mask_next & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) - { - if( drop ) - { - deselect(); - S32 old_cursor = mCursorPos; - setCursorAtLocalPos( x, y, TRUE ); - S32 insert_pos = mCursorPos; - setCursorPos(old_cursor); - BOOL inserted = insertEmbeddedItem( insert_pos, item ); - if( inserted && (old_cursor > mCursorPos) ) - { - setCursorPos(mCursorPos + 1); - } - - needsReflow(); - - } - *accept = ACCEPT_YES_COPY_MULTI; - } - else + deselect(); + S32 old_cursor = mCursorPos; + setCursorAtLocalPos( x, y, TRUE ); + S32 insert_pos = mCursorPos; + setCursorPos(old_cursor); + BOOL inserted = insertEmbeddedItem( insert_pos, item ); + if( inserted && (old_cursor > mCursorPos) ) { - *accept = ACCEPT_NO; - if (tooltip_msg.empty()) - { - // *TODO: Translate - tooltip_msg.assign("Only items with unrestricted\n" - "'next owner' permissions \n" - "can be attached to notecards."); - } + setCursorPos(mCursorPos + 1); } + + needsReflow(); } - else + *accept = ACCEPT_YES_COPY_MULTI; + } + else + { + *accept = ACCEPT_NO; + if (tooltip_msg.empty()) { - *accept = ACCEPT_NO; + tooltip_msg.assign(LLTrans::getString("TooltipNotecardOwnerRestrictedDrop")); } - break; } - - default: + } + else + { *accept = ACCEPT_NO; - break; } } else -- cgit v1.2.3 From 0b3a4c75568a1648926c24463ed11cba53cfddb8 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 28 Aug 2018 18:18:36 +0300 Subject: MAINT-8910 FIXED EEP - clicking at settings embedded into notecard does nothing --- indra/newview/llviewertexteditor.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'indra/newview/llviewertexteditor.cpp') diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 714170a513..6899424cf6 100644 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -1123,7 +1123,9 @@ BOOL LLViewerTextEditor::openEmbeddedItem(LLPointer item, llwch case LLAssetType::AT_CALLINGCARD: openEmbeddedCallingcard( item, wc ); return TRUE; - + case LLAssetType::AT_SETTINGS: + openEmbeddedSetting(item, wc); + return TRUE; case LLAssetType::AT_NOTECARD: case LLAssetType::AT_LSL_TEXT: case LLAssetType::AT_CLOTHING: @@ -1198,6 +1200,18 @@ void LLViewerTextEditor::openEmbeddedCallingcard( LLInventoryItem* item, llwchar } } +void LLViewerTextEditor::openEmbeddedSetting(LLInventoryItem* item, llwchar wc) +{ + if (LLEnvironment::instance().isInventoryEnabled()) + { + showCopyToInvDialog(item, wc); + } + else + { + LLNotificationsUtil::add("NoEnvironmentSettings"); + } +} + void LLViewerTextEditor::showUnsavedAlertDialog( LLInventoryItem* item ) { LLSD payload; -- cgit v1.2.3