diff options
author | AndreyL ProductEngine <andreylproductengine@lindenlab.com> | 2015-08-04 05:00:59 +0300 |
---|---|---|
committer | AndreyL ProductEngine <andreylproductengine@lindenlab.com> | 2015-08-04 05:00:59 +0300 |
commit | b5378f93b298098cf841286ba6eb970ee5d855eb (patch) | |
tree | c2f395318d33ae90c12d88d4258796b7ce6db62d /indra/newview/lltoolmgr.cpp | |
parent | 8f5676202821b9b8addb19fe8b93bac56057c6af (diff) | |
parent | 310ec101dfd2c69ecc1a51d0a3a8ea12d5fdaf7a (diff) |
Merge viewer-release and become version 3.8.3
Diffstat (limited to 'indra/newview/lltoolmgr.cpp')
-rwxr-xr-x | indra/newview/lltoolmgr.cpp | 20 |
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) |