summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmaininventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanelmaininventory.cpp')
-rw-r--r--indra/newview/llpanelmaininventory.cpp9
1 files changed, 9 insertions, 0 deletions
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 //
////////////////////////////////////////////////////////////////////////////////