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/llinventorybridge.cpp | 50 +++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 904bc29929..9da987daff 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -1410,6 +1410,14 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type, //LL_WARNS() << LLAssetType::lookup(asset_type) << " asset type is unhandled for uuid " << uuid << LL_ENDL; break; + case LLAssetType::AT_SETTINGS: + if (inv_type != LLInventoryType::IT_SETTINGS) + { + LL_WARNS() << LLAssetType::lookup(asset_type) << " asset has inventory type " << LLInventoryType::lookupHumanReadable(inv_type) << " on uuid " << uuid << LL_ENDL; + } + new_listener = new LLSettingsBridge(inventory, root, uuid, LLSettingsType::fromInventoryFlags(flags)); + break; + default: LL_INFOS() << "Unhandled asset type (llassetstorage.h): " << (S32)asset_type << " (" << LLAssetType::lookup(asset_type) << ")" << LL_ENDL; @@ -6837,6 +6845,48 @@ void LLMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags) hide_context_entries(menu, items, disabled_items); } +// +=================================================+ +// | LLSettingsBridge | +// +=================================================+ + +LLSettingsBridge::LLSettingsBridge(LLInventoryPanel* inventory, + LLFolderView* root, + const LLUUID& uuid, + LLSettingsType::type_e settings_type): + LLItemBridge(inventory, root, uuid), + mSettingsType(settings_type) +{ +} + +LLUIImagePtr LLSettingsBridge::getIcon() const +{ + return LLInventoryIcon::getIcon(LLAssetType::AT_SETTINGS, LLInventoryType::IT_SETTINGS, mSettingsType, FALSE); +} + +void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action) +{ + LLItemBridge::performAction(model, action); +} + +void LLSettingsBridge::openItem() +{ + LLItemBridge::openItem(); +} + +void LLSettingsBridge::buildContextMenu(LLMenuGL& menu, U32 flags) +{ + LLItemBridge::buildContextMenu(menu, flags); +} + +std::string LLSettingsBridge::getLabelSuffix() const +{ + return LLItemBridge::getLabelSuffix(); +} + +BOOL LLSettingsBridge::renameItem(const std::string& new_name) +{ + return LLItemBridge::renameItem(new_name); +} // +=================================================+ // | LLLinkBridge | -- cgit v1.2.3 From 3e33fc9130cdd5dc63cc6cc7b9f0e38b6e552f12 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 3 May 2018 14:59:29 -0700 Subject: Inventory context menus and increment attrib for settings panels. --- indra/newview/llinventorybridge.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index fbc35e9192..9311861d83 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -82,6 +82,8 @@ #include "lllandmarkactions.h" #include "llpanellandmarks.h" +#include "llenvironment.h" + #include void copy_slurl_to_clipboard_callback_inv(const std::string& slurl); @@ -4029,10 +4031,18 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items items.push_back(std::string("New Gesture")); items.push_back(std::string("New Clothes")); items.push_back(std::string("New Body Parts")); + items.push_back(std::string("New Settings")); items.push_back(std::string("upload_def")); + + if (!LLEnvironment::instance().isInventoryEnabled()) + { + disabled_items.push_back("New Settings"); + } + } } getClipboardEntries(false, items, disabled_items, flags); + } else { -- cgit v1.2.3 From 3c18de21369260ec9b7ba39c0e360045dd65e30d Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 10 May 2018 17:08:13 -0700 Subject: Settings editor available from the open context on the menu. Can edit inventory items. --- indra/newview/llinventorybridge.cpp | 43 ++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 9311861d83..7697714f2f 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -6910,7 +6910,11 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action void LLSettingsBridge::openItem() { - LLItemBridge::openItem(); + LLViewerInventoryItem* item = getItem(); + if (item) + { + LLInvFVBridgeAction::doAction(item->getType(), mUUID, getInventoryModel()); + } } void LLSettingsBridge::buildContextMenu(LLMenuGL& menu, U32 flags) @@ -7271,6 +7275,40 @@ void LLWearableBridgeAction::wearOnAvatar() } } +class LLSettingsBridgeAction + : public LLInvFVBridgeAction +{ + friend class LLInvFVBridgeAction; +public: + virtual void doIt() + { + LLViewerInventoryItem* item = getItem(); + if (item) + { + LLSettingsType::type_e type = item->getSettingsType(); + switch (type) + { + case LLSettingsType::ST_SKY: + LLFloaterReg::showInstance("env_fixed_environmentent_sky", LLSDMap("inventory_id", item->getUUID()), TAKE_FOCUS_YES); + break; + case LLSettingsType::ST_WATER: + LLFloaterReg::showInstance("env_fixed_environmentent_water", LLSDMap("inventory_id", item->getUUID()), TAKE_FOCUS_YES); + break; + case LLSettingsType::ST_DAYCYCLE: + //LLFloaterReg::showInstance("env_fixed_environmentent_day", LLSDMap("inventory_id", item->getUUID()), TAKE_FOCUS_YES); + break; + default: + break; + } + } + LLInvFVBridgeAction::doIt(); + } + virtual ~LLSettingsBridgeAction(){} +protected: + LLSettingsBridgeAction(const LLUUID& id, LLInventoryModel* model) : LLInvFVBridgeAction(id, model) {} +}; + + LLInvFVBridgeAction* LLInvFVBridgeAction::createAction(LLAssetType::EType asset_type, const LLUUID& uuid, LLInventoryModel* model) @@ -7309,6 +7347,9 @@ LLInvFVBridgeAction* LLInvFVBridgeAction::createAction(LLAssetType::EType asset_ case LLAssetType::AT_BODYPART: action = new LLWearableBridgeAction(uuid,model); break; + case LLAssetType::AT_SETTINGS: + action = new LLSettingsBridgeAction(uuid, model); + break; default: break; } -- cgit v1.2.3 From b29aa01056a1ea08d1d29dd610f6a1cd0aadcd9b Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 22 May 2018 16:54:04 -0700 Subject: Enable save/load/import for day edit. --- indra/newview/llinventorybridge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 699370cad3..2b74116f8b 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -7293,7 +7293,7 @@ public: LLFloaterReg::showInstance("env_fixed_environmentent_water", LLSDMap("inventory_id", item->getUUID()), TAKE_FOCUS_YES); break; case LLSettingsType::ST_DAYCYCLE: - //LLFloaterReg::showInstance("env_fixed_environmentent_day", LLSDMap("inventory_id", item->getUUID()), TAKE_FOCUS_YES); + LLFloaterReg::showInstance("env_edit_extdaycycle", LLSDMap("inventory_id", item->getUUID()), TAKE_FOCUS_YES); break; default: break; -- cgit v1.2.3 From 2a613d7363c4e91a7258d4f0ea3971db1569e788 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 1 Jun 2018 16:24:36 -0700 Subject: Rework preset loading and context menu from inventory. --- indra/newview/llinventorybridge.cpp | 82 +++++++++++++++++++++++++++++++++++-- 1 file changed, 79 insertions(+), 3 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 2b74116f8b..fe7d302992 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -6903,7 +6903,44 @@ LLUIImagePtr LLSettingsBridge::getIcon() const void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action) { - LLItemBridge::performAction(model, action); + if ("apply_settings_local" == action) + { + // Single item only + LLViewerInventoryItem* item = static_cast(getItem()); + if (!item) + return; + LLUUID asset_id = item->getProtectedAssetUUID(); + LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, asset_id); + LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL); + } + else if ("apply_settings_parcel" == action) + { + // Single item only + LLViewerInventoryItem* item = static_cast(getItem()); + if (!item) + return; + LLUUID asset_id = item->getProtectedAssetUUID(); + // *LAPRAS* TODO update on simulator. + LL_WARNS("LAPRAS") << "Only updating locally!!! NOT REALLY PARCEL UPDATE" << LL_ENDL; + LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_LOCAL); + LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_PARCEL, asset_id); + LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL); + } + else if ("apply_settings_region" == action) + { + // Single item only + LLViewerInventoryItem* item = static_cast(getItem()); + if (!item) + return; + LLUUID asset_id = item->getProtectedAssetUUID(); + // *LAPRAS* TODO update on simulator. + LL_WARNS("LAPRAS") << "Only updating locally!!! NOT REALLY REGION UPDATE" << LL_ENDL; + LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_LOCAL); + LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_REGION, asset_id); + LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL); + } + else + LLItemBridge::performAction(model, action); } void LLSettingsBridge::openItem() @@ -6917,9 +6954,48 @@ void LLSettingsBridge::openItem() void LLSettingsBridge::buildContextMenu(LLMenuGL& menu, U32 flags) { - LLItemBridge::buildContextMenu(menu, flags); -} + LL_DEBUGS() << "LLSettingsBridge::buildContextMenu()" << LL_ENDL; + menuentry_vec_t items; + menuentry_vec_t disabled_items; + if (isMarketplaceListingsFolder()) + { + menuentry_vec_t items; + menuentry_vec_t disabled_items; + addMarketplaceContextMenuOptions(flags, items, disabled_items); + items.push_back(std::string("Properties")); + getClipboardEntries(false, items, disabled_items, flags); + hide_context_entries(menu, items, disabled_items); + } + else if (isItemInTrash()) + { + addTrashContextMenuOptions(items, disabled_items); + } + else + { + items.push_back(std::string("Share")); + if (!canShare()) + { + disabled_items.push_back(std::string("Share")); + } + + addOpenRightClickMenuOption(items); + items.push_back(std::string("Properties")); + + getClipboardEntries(true, items, disabled_items, flags); + + items.push_back("Settings Separator"); + items.push_back("Settings Apply Local"); + + items.push_back("Settings Apply Parcel"); + // *LAPRAS* TODO: test for permission + + items.push_back("Settings Apply Region"); + // *LAPRAS* TODO: test for permission + } + addLinkReplaceMenuOption(items, disabled_items); + hide_context_entries(menu, items, disabled_items); +} std::string LLSettingsBridge::getLabelSuffix() const { return LLItemBridge::getLabelSuffix(); -- cgit v1.2.3 From b06803225bff30e863ea18cae1d33f42a4fd937e Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 4 Jun 2018 16:50:13 -0700 Subject: Reconnect apply to region and parcel reconnected to interface. --- indra/newview/llinventorybridge.cpp | 48 ++++++++++++++++++++++++------------- 1 file changed, 31 insertions(+), 17 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index fe7d302992..58f6c2065b 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -81,6 +81,8 @@ #include "llwearableitemslist.h" #include "lllandmarkactions.h" #include "llpanellandmarks.h" +#include "llviewerparcelmgr.h" +#include "llparcel.h" #include "llenvironment.h" @@ -6920,11 +6922,16 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action if (!item) return; LLUUID asset_id = item->getProtectedAssetUUID(); - // *LAPRAS* TODO update on simulator. - LL_WARNS("LAPRAS") << "Only updating locally!!! NOT REALLY PARCEL UPDATE" << LL_ENDL; - LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_LOCAL); - LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_PARCEL, asset_id); - LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL); + + LLParcel *parcel = LLViewerParcelMgr::instance().getAgentParcel(); + if (!parcel) + { + LL_WARNS("INVENTORY") << "could not identify parcel." << LL_ENDL; + return; + } + S32 parcel_id = parcel->getLocalID(); + + LLEnvironment::instance().updateParcel(parcel_id, asset_id, -1, -1); } else if ("apply_settings_region" == action) { @@ -6933,11 +6940,8 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action if (!item) return; LLUUID asset_id = item->getProtectedAssetUUID(); - // *LAPRAS* TODO update on simulator. - LL_WARNS("LAPRAS") << "Only updating locally!!! NOT REALLY REGION UPDATE" << LL_ENDL; - LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_LOCAL); - LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_REGION, asset_id); - LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL); + + LLEnvironment::instance().updateRegion(asset_id, -1, -1); } else LLItemBridge::performAction(model, action); @@ -6988,24 +6992,34 @@ void LLSettingsBridge::buildContextMenu(LLMenuGL& menu, U32 flags) items.push_back("Settings Apply Local"); items.push_back("Settings Apply Parcel"); - // *LAPRAS* TODO: test for permission - + if (!canUpdateParcel()) + disabled_items.push_back("Settings Apply Parcel"); + items.push_back("Settings Apply Region"); - // *LAPRAS* TODO: test for permission + if (!canUpdateRegion()) + disabled_items.push_back("Settings Apply Region"); } addLinkReplaceMenuOption(items, disabled_items); hide_context_entries(menu, items, disabled_items); } -std::string LLSettingsBridge::getLabelSuffix() const -{ - return LLItemBridge::getLabelSuffix(); -} BOOL LLSettingsBridge::renameItem(const std::string& new_name) { + /*TODO: change internal settings name? */ return LLItemBridge::renameItem(new_name); } +bool LLSettingsBridge::canUpdateParcel() const +{ + return LLEnvironment::instance().canAgentUpdateParcelEnvironment(); +} + +bool LLSettingsBridge::canUpdateRegion() const +{ + return LLEnvironment::instance().canAgentUpdateRegionEnvironment(); +} + + // +=================================================+ // | LLLinkBridge | // +=================================================+ -- cgit v1.2.3 From 97da85de0b1e0f8c2fc60c156c31b237b869230a Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 11 Jun 2018 11:43:50 -0700 Subject: remove legacy environmental edit floater and some lingering transition functions. Change floater environment switch behavior. --- indra/newview/llinventorybridge.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 58f6c2065b..f1c7615efc 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -6911,7 +6911,8 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action LLViewerInventoryItem* item = static_cast(getItem()); if (!item) return; - LLUUID asset_id = item->getProtectedAssetUUID(); + LLUUID asset_id = item->getAssetUUID(); + LL_WARNS("LAPRAS") << "Locally applying asset ID " << asset_id << LL_ENDL; LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, asset_id); LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL); } @@ -6921,7 +6922,7 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action LLViewerInventoryItem* item = static_cast(getItem()); if (!item) return; - LLUUID asset_id = item->getProtectedAssetUUID(); + LLUUID asset_id = item->getAssetUUID(); LLParcel *parcel = LLViewerParcelMgr::instance().getAgentParcel(); if (!parcel) @@ -6931,6 +6932,7 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action } S32 parcel_id = parcel->getLocalID(); + LL_WARNS("LAPRAS") << "Applying asset ID " << asset_id << " to parcel " << parcel_id << LL_ENDL; LLEnvironment::instance().updateParcel(parcel_id, asset_id, -1, -1); } else if ("apply_settings_region" == action) @@ -6939,7 +6941,9 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action LLViewerInventoryItem* item = static_cast(getItem()); if (!item) return; - LLUUID asset_id = item->getProtectedAssetUUID(); + LLUUID asset_id = item->getAssetUUID(); + + LL_WARNS("LAPRAS") << "Applyng asset id " << asset_id << " to region." << LL_ENDL; LLEnvironment::instance().updateRegion(asset_id, -1, -1); } -- 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/llinventorybridge.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index f1c7615efc..b7b5185672 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -4307,6 +4307,7 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop, case DAD_ANIMATION: case DAD_GESTURE: case DAD_MESH: + case DAD_SETTINGS: accept = dragItemIntoFolder(inv_item, drop, tooltip_msg); break; case DAD_LINK: @@ -5812,6 +5813,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop, case DAD_ANIMATION: case DAD_GESTURE: case DAD_MESH: + case DAD_SETTINGS: { LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data; const LLPermissions& perm = inv_item->getPermissions(); -- cgit v1.2.3 From 294793b9a983a0c26c0e82bd432d4cc311ecb1ba Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 10 Jul 2018 15:15:47 -0700 Subject: MAINT-8821: Tighten up floater. Allow apply from gear menu. --- indra/newview/llinventorybridge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 44a9d0bff4..85e2974c1b 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -6926,7 +6926,7 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action return; LLUUID asset_id = item->getAssetUUID(); - LLParcel *parcel = LLViewerParcelMgr::instance().getAgentParcel(); + LLParcel *parcel = LLViewerParcelMgr::instance().getAgentOrSelectedParcel(); if (!parcel) { LL_WARNS("INVENTORY") << "could not identify parcel." << LL_ENDL; -- cgit v1.2.3 From 1716129fd23ff35e030808406af1a8f796dc4b01 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 17 Aug 2018 12:35:42 -0700 Subject: MAINT-8826, MAINT-8990, MAINT-9002, MAINT-7703: Rework for environment pannels in Region/Estate and Parcel. Enable/disable by permission. Edit the correct environment. Dirty flags for changes. Estate owner disallow switch. --- indra/newview/llinventorybridge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 85e2974c1b..138ce9e1cf 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -7389,7 +7389,7 @@ public: LLFloaterReg::showInstance("env_fixed_environmentent_water", LLSDMap("inventory_id", item->getUUID()), TAKE_FOCUS_YES); break; case LLSettingsType::ST_DAYCYCLE: - LLFloaterReg::showInstance("env_edit_extdaycycle", LLSDMap("inventory_id", item->getUUID()), TAKE_FOCUS_YES); + LLFloaterReg::showInstance("env_edit_extdaycycle", LLSDMap("inventory_id", item->getUUID())("edit_context", "inventory"), TAKE_FOCUS_YES); break; default: break; -- 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/llinventorybridge.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 138ce9e1cf..e50055feb2 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -5097,6 +5097,11 @@ BOOL LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item, tooltip_msg = LLTrans::getString("TooltipOutboxNotInInventory"); accept = FALSE; } + else if ((inv_item->getActualType() == LLAssetType::AT_SETTINGS) && !LLEnvironment::instance().isInventoryEnabled()) + { + tooltip_msg = LLTrans::getString("NoEnvironmentSettings"); + accept = FALSE; + } else { // Don't allow placing an original item from a notecard to Current Outfit or an outfit folder -- cgit v1.2.3 From a2288ecca3c6f7e861bbc3389d83cbee92c719f2 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Thu, 13 Sep 2018 11:40:27 +0300 Subject: SL-984 Disable creating EEP settings under Lost and Found folder --- 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 e50055feb2..8d084f3ece 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -3940,6 +3940,7 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items disabled_items.push_back(std::string("New Folder")); disabled_items.push_back(std::string("New Script")); disabled_items.push_back(std::string("New Note")); + disabled_items.push_back(std::string("New Settings")); disabled_items.push_back(std::string("New Gesture")); disabled_items.push_back(std::string("New Clothes")); disabled_items.push_back(std::string("New Body Parts")); -- cgit v1.2.3 From 2ee39e7df04161655c6d2476b39bda25bcd7380c Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Wed, 19 Sep 2018 16:54:53 +0300 Subject: SL-9665 FIXED [EEP] "Rename" greyed out for assets in My Environments --- indra/newview/llinventorybridge.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 8d084f3ece..3dc138af7f 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -7021,6 +7021,16 @@ BOOL LLSettingsBridge::renameItem(const std::string& new_name) return LLItemBridge::renameItem(new_name); } +BOOL LLSettingsBridge::isItemRenameable() const +{ + LLViewerInventoryItem* item = getItem(); + if (item) + { + return (item->getPermissions().allowModifyBy(gAgent.getID())); + } + return FALSE; +} + bool LLSettingsBridge::canUpdateParcel() const { return LLEnvironment::instance().canAgentUpdateParcelEnvironment(); -- cgit v1.2.3 From 51772e6083d8af786704cee18f5eb3c9b3dfefda Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 2 Nov 2018 09:17:19 -0700 Subject: SL-9886: Viewer send and receive new day_name(s) information in the environment protocol for viewer specified names on individual tracks. --- indra/newview/llinventorybridge.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 3b6778892f..bc953f3ed1 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -6933,6 +6933,7 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action if (!item) return; LLUUID asset_id = item->getAssetUUID(); + std::string name = item->getName(); LLParcel *parcel = LLViewerParcelMgr::instance().getAgentOrSelectedParcel(); if (!parcel) @@ -6943,7 +6944,7 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action S32 parcel_id = parcel->getLocalID(); LL_WARNS("LAPRAS") << "Applying asset ID " << asset_id << " to parcel " << parcel_id << LL_ENDL; - LLEnvironment::instance().updateParcel(parcel_id, asset_id, -1, -1); + LLEnvironment::instance().updateParcel(parcel_id, asset_id, name, -1, -1); } else if ("apply_settings_region" == action) { @@ -6952,10 +6953,11 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action if (!item) return; LLUUID asset_id = item->getAssetUUID(); + std::string name = item->getName(); LL_WARNS("LAPRAS") << "Applyng asset id " << asset_id << " to region." << LL_ENDL; - LLEnvironment::instance().updateRegion(asset_id, -1, -1); + LLEnvironment::instance().updateRegion(asset_id, name, -1, -1); } else LLItemBridge::performAction(model, action); -- cgit v1.2.3 From 1f1d29e3462fb0adff9342b657160441d5b992d0 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 28 Nov 2018 15:05:30 +0200 Subject: SL-9787 EEP Remove Apply to Region from right-click menus. --- indra/newview/llinventorybridge.cpp | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index bc953f3ed1..6a5c124108 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -6946,19 +6946,6 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action LL_WARNS("LAPRAS") << "Applying asset ID " << asset_id << " to parcel " << parcel_id << LL_ENDL; LLEnvironment::instance().updateParcel(parcel_id, asset_id, name, -1, -1); } - else if ("apply_settings_region" == action) - { - // Single item only - LLViewerInventoryItem* item = static_cast(getItem()); - if (!item) - return; - LLUUID asset_id = item->getAssetUUID(); - std::string name = item->getName(); - - LL_WARNS("LAPRAS") << "Applyng asset id " << asset_id << " to region." << LL_ENDL; - - LLEnvironment::instance().updateRegion(asset_id, name, -1, -1); - } else LLItemBridge::performAction(model, action); } -- cgit v1.2.3 From d66012f85e885679738cf8c488fd8ff460319c85 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Fri, 30 Nov 2018 17:48:08 +0200 Subject: SL-9716 [EEP] "Use Shared Environment" does not enable when applying an environment to a parcel or region --- 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 6a5c124108..f2d418fc9d 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -6945,6 +6945,7 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action LL_WARNS("LAPRAS") << "Applying asset ID " << asset_id << " to parcel " << parcel_id << LL_ENDL; LLEnvironment::instance().updateParcel(parcel_id, asset_id, name, -1, -1); + LLEnvironment::instance().setSharedEnvironment(); } else LLItemBridge::performAction(model, action); -- cgit v1.2.3 From 00d8caa359a216620db46d49696bc79a95fe8dc2 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 10 Jan 2019 22:11:11 +0200 Subject: SL-10279 Finalize drag and drop support --- indra/newview/llinventorybridge.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 44927de75e..142720dd03 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -6959,7 +6959,7 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action S32 parcel_id = parcel->getLocalID(); LL_WARNS("LAPRAS") << "Applying asset ID " << asset_id << " to parcel " << parcel_id << LL_ENDL; - LLEnvironment::instance().updateParcel(parcel_id, asset_id, name, -1, -1); + LLEnvironment::instance().updateParcel(parcel_id, asset_id, name, LLEnvironment::NO_TRACK, -1, -1); LLEnvironment::instance().setSharedEnvironment(); } else -- cgit v1.2.3 From 506c3b072afbe0e076279e8cb38b514458882f47 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 11 Jan 2019 16:29:25 -0800 Subject: SL-10350: If the item is now owned by the current user assume it is in the libary. Don't let them edit. --- indra/newview/llinventorybridge.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 142720dd03..fda77c72c0 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -6971,7 +6971,10 @@ void LLSettingsBridge::openItem() LLViewerInventoryItem* item = getItem(); if (item) { - LLInvFVBridgeAction::doAction(item->getType(), mUUID, getInventoryModel()); + if (item->getPermissions().getOwner() != gAgent.getID()) + LLNotificationsUtil::add("NoEditFromLibrary"); + else + LLInvFVBridgeAction::doAction(item->getType(), mUUID, getInventoryModel()); } } -- cgit v1.2.3 From 2401712d1073e85b4b9183d20c6e9274bc874f64 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 20 Feb 2019 15:20:30 -0800 Subject: SL-9660: Next pass cleanup. Removed and downgraded a number of logs. Removed refs to LAPAS. Better sync with legacy regions. --- indra/newview/llinventorybridge.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index fda77c72c0..61696d89e3 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -6937,7 +6937,6 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action if (!item) return; LLUUID asset_id = item->getAssetUUID(); - LL_WARNS("LAPRAS") << "Locally applying asset ID " << asset_id << LL_ENDL; LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, asset_id); LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL); } @@ -6958,7 +6957,7 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action } S32 parcel_id = parcel->getLocalID(); - LL_WARNS("LAPRAS") << "Applying asset ID " << asset_id << " to parcel " << parcel_id << LL_ENDL; + LL_DEBUGS("ENVIRONMENT") << "Applying asset ID " << asset_id << " to parcel " << parcel_id << LL_ENDL; LLEnvironment::instance().updateParcel(parcel_id, asset_id, name, LLEnvironment::NO_TRACK, -1, -1); LLEnvironment::instance().setSharedEnvironment(); } -- cgit v1.2.3 From 605c9c19661702755171669e2af846abe77d2a51 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Wed, 8 May 2019 11:42:31 -0700 Subject: Fix merge fail. --- indra/newview/llinventorybridge.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llinventorybridge.cpp') diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 50c4fdc870..ee9dfbc376 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -81,6 +81,10 @@ #include "llwearableitemslist.h" #include "lllandmarkactions.h" #include "llpanellandmarks.h" +#include "llviewerparcelmgr.h" +#include "llparcel.h" + +#include "llenvironment.h" #include @@ -4058,7 +4062,6 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items } } getClipboardEntries(false, items, disabled_items, flags); - } else { -- cgit v1.2.3 From 1f656735d339fc4d83da86efbb400af1361c27db Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 26 Aug 2019 11:43:45 -0700 Subject: SL-11705, SL-11706: New flags in llsettings base for tracking by simulator. --- 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 ee9dfbc376..97260fba4c 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -6948,6 +6948,13 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action LLUUID asset_id = item->getAssetUUID(); std::string name = item->getName(); + U32 flags(0); + + if (!item->getPermissions().allowOperationBy(PERM_MODIFY, gAgent.getID())) + flags |= LLSettingsBase::FLAG_NOMOD; + if (!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID())) + flags |= LLSettingsBase::FLAG_NOTRANS; + LLParcel *parcel = LLViewerParcelMgr::instance().getAgentOrSelectedParcel(); if (!parcel) { @@ -6957,7 +6964,7 @@ void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action S32 parcel_id = parcel->getLocalID(); LL_DEBUGS("ENVIRONMENT") << "Applying asset ID " << asset_id << " to parcel " << parcel_id << LL_ENDL; - LLEnvironment::instance().updateParcel(parcel_id, asset_id, name, LLEnvironment::NO_TRACK, -1, -1); + LLEnvironment::instance().updateParcel(parcel_id, asset_id, name, LLEnvironment::NO_TRACK, -1, -1, flags); LLEnvironment::instance().setSharedEnvironment(); } else -- cgit v1.2.3