summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelmaininventory.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-07-09 13:26:48 -0700
committerRider Linden <rider@lindenlab.com>2018-07-09 13:26:48 -0700
commit21d165011b81909c8cab944755b53f908e51ad16 (patch)
tree4a2dc72d9838987c120b331caa9d9a9355152a02 /indra/newview/llpanelmaininventory.cpp
parent0bf678e23b2a29fcd2bf1488f999168b8737c010 (diff)
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.
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 //
////////////////////////////////////////////////////////////////////////////////