From 96e8e670e104d852b1a925976f3d935448eba103 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 29 Jun 2018 12:59:53 -0700 Subject: Enable settings inventory filter checkbox. Fix day cycle editor selection on open. --- indra/newview/llpanelmaininventory.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'indra/newview/llpanelmaininventory.cpp') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index db9d61c637..a9ad41e6f7 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -905,6 +905,7 @@ void LLFloaterInventoryFinder::updateElementsFromFilter() getChild("check_sound")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_SOUND)); getChild("check_texture")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_TEXTURE)); getChild("check_snapshot")->setValue((S32) (filter_types & 0x1 << LLInventoryType::IT_SNAPSHOT)); + getChild("check_settings")->setValue((S32)(filter_types & 0x1 << LLInventoryType::IT_SETTINGS)); getChild("check_show_empty")->setValue(show_folders == LLInventoryFilter::SHOW_ALL_FOLDERS); getChild("check_created_by_me")->setValue(show_created_by_me); @@ -997,6 +998,12 @@ void LLFloaterInventoryFinder::draw() filtered_by_all_types = FALSE; } + if (!getChild("check_settings")->getValue()) + { + filter &= ~(0x1 << LLInventoryType::IT_SETTINGS); + filtered_by_all_types = FALSE; + } + if (!filtered_by_all_types || (mPanelMainInventory->getPanel()->getFilter().getFilterTypes() & LLInventoryFilter::FILTERTYPE_DATE)) { // don't include folders in filter, unless I've selected everything or filtering by date @@ -1114,7 +1121,8 @@ void LLFloaterInventoryFinder::selectAllTypes(void* user_data) self->getChild("check_script")->setValue(TRUE); self->getChild("check_sound")->setValue(TRUE); self->getChild("check_texture")->setValue(TRUE); - self->getChild("check_snapshot")->setValue(TRUE); + self->getChild("check_snapshot")->setValue(TRUE); + self->getChild("check_settings")->setValue(TRUE); } //static @@ -1135,6 +1143,7 @@ void LLFloaterInventoryFinder::selectNoTypes(void* user_data) self->getChild("check_sound")->setValue(FALSE); self->getChild("check_texture")->setValue(FALSE); self->getChild("check_snapshot")->setValue(FALSE); + self->getChild("check_settings")->setValue(FALSE); } ////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3 From 21d165011b81909c8cab944755b53f908e51ad16 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 9 Jul 2018 13:26:48 -0700 Subject: Attempting to create a settings inventory item on a non-eep region will now show a visible failure message to the user. Menu items for greating settings in inventory are disabled on non eep regions. --- indra/newview/llpanelmaininventory.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview/llpanelmaininventory.cpp') diff --git a/indra/newview/llpanelmaininventory.cpp b/indra/newview/llpanelmaininventory.cpp index a9ad41e6f7..b5e24b6efb 100644 --- a/indra/newview/llpanelmaininventory.cpp +++ b/indra/newview/llpanelmaininventory.cpp @@ -58,6 +58,7 @@ #include "llsidepanelinventory.h" #include "llfolderview.h" #include "llradiogroup.h" +#include "llenvironment.h" const std::string FILTERS_FILENAME("filters.xml"); @@ -128,6 +129,9 @@ LLPanelMainInventory::LLPanelMainInventory(const LLPanel::Params& p) mCommitCallbackRegistrar.add("Inventory.SetSortBy", boost::bind(&LLPanelMainInventory::setSortBy, this, _2)); mCommitCallbackRegistrar.add("Inventory.Share", boost::bind(&LLAvatarActions::shareWithAvatars, this)); + mEnableCallbackRegistrar.add("Inventory.EnvironmentEnabled", [](LLUICtrl *, const LLSD &) { return LLPanelMainInventory::hasSettingsInventory(); }); + + mSavedFolderState = new LLSaveFolderState(); mSavedFolderState->setApply(FALSE); } @@ -1555,5 +1559,10 @@ void LLPanelMainInventory::setUploadCostIfNeeded() } } +bool LLPanelMainInventory::hasSettingsInventory() +{ + return LLEnvironment::instance().isInventoryEnabled(); +} + // List Commands // //////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3