summaryrefslogtreecommitdiff
path: root/indra/newview/lltoolmgr.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2015-08-17 16:00:04 -0400
committerOz Linden <oz@lindenlab.com>2015-08-17 16:00:04 -0400
commitfe2eefd9139a860cd9ffa67ee5f148ba3922320c (patch)
treed0395a805b44f525a5614bb2b3489d944555c170 /indra/newview/lltoolmgr.cpp
parent4fb66604c9767bf518575963e9d4a871800bdeb3 (diff)
parent1be63209331d509396bd7ee79302d511fe83d72e (diff)
merge changes for 3.8.3-release
Diffstat (limited to 'indra/newview/lltoolmgr.cpp')
-rwxr-xr-xindra/newview/lltoolmgr.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp
index 175227173f..3ecb4015ce 100755
--- a/indra/newview/lltoolmgr.cpp
+++ b/indra/newview/lltoolmgr.cpp
@@ -37,6 +37,7 @@
#include "llfloaterinspect.h"
#include "lltool.h"
#include "llmanipscale.h"
+#include "llmarketplacefunctions.h"
#include "llselectmgr.h"
#include "lltoolbrush.h"
#include "lltoolcomp.h"
@@ -83,6 +84,8 @@ LLToolMgr::LLToolMgr()
LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Active", boost::bind(&LLToolMgr::inEdit, this));
LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Build.Enabled", boost::bind(&LLToolMgr::canEdit, this));
LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Build.Toggle", boost::bind(&LLToolMgr::toggleBuildMode, this, _2));
+ LLUICtrl::EnableCallbackRegistry::currentRegistrar().add("Marketplace.Enabled", boost::bind(&LLToolMgr::canAccessMarketplace, this));
+ LLUICtrl::CommitCallbackRegistry::currentRegistrar().add("Marketplace.Toggle", boost::bind(&LLToolMgr::toggleMarketplace, this, _2));
gToolNull = new LLTool(LLStringUtil::null); // Does nothing
setCurrentTool(gToolNull);
@@ -345,6 +348,23 @@ bool LLToolMgr::inBuildMode()
return b;
}
+bool LLToolMgr::canAccessMarketplace()
+{
+ return (LLMarketplaceData::instance().getSLMStatus() != MarketplaceStatusCodes::MARKET_PLACE_NOT_MIGRATED_MERCHANT) || gSavedSettings.getBOOL("InventoryOutboxDisplayBoth");
+}
+
+void LLToolMgr::toggleMarketplace(const LLSD& sdname)
+{
+ const std::string& param = sdname.asString();
+
+ if ((param != "marketplace") || !canAccessMarketplace())
+ {
+ return;
+ }
+
+ LLFloaterReg::toggleInstanceOrBringToFront("marketplace_listings");
+}
+
void LLToolMgr::setTransientTool(LLTool* tool)
{
if (!tool)