diff options
author | Merov Linden <merov@lindenlab.com> | 2014-03-06 19:12:25 -0800 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-03-06 19:12:25 -0800 |
commit | 93da0cea6294c354614cd2c4e7b4a49b7e08cd6f (patch) | |
tree | 1bc73ae346d76cb4af9200d25b00fc2a0e5630ca /indra/newview/llfloateroutbox.cpp | |
parent | a030b30d34ef3152791b123c4f52d4086f3eb549 (diff) |
DD-7 : Initialize the Merchant Items floater checking the is a Merchant status correctly. No indication it's initializing (UI) but the code works
Diffstat (limited to 'indra/newview/llfloateroutbox.cpp')
-rwxr-xr-x | indra/newview/llfloateroutbox.cpp | 61 |
1 files changed, 52 insertions, 9 deletions
diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index 5ed72e4250..c5ece0ccd6 100755 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -826,19 +826,18 @@ void LLFloaterMerchantItems::setup() void LLFloaterMerchantItems::initializeMarketPlace() { - // *TODO : What do we need to do really once the merchant items folder has been created? // // Initialize the marketplace import API // - //LLMarketplaceInventoryImporter& importer = LLMarketplaceInventoryImporter::instance(); + LLMarketplaceInventoryImporter& importer = LLMarketplaceInventoryImporter::instance(); - //if (!importer.isInitialized()) - //{ - //importer.setInitializationErrorCallback(boost::bind(&LLFloaterOutbox::initializationReportError, this, _1, _2)); - //importer.setStatusChangedCallback(boost::bind(&LLFloaterOutbox::importStatusChanged, this, _1)); - //importer.setStatusReportCallback(boost::bind(&LLFloaterOutbox::importReportResults, this, _1, _2)); - //importer.initialize(); - //} + if (!importer.isInitialized()) + { + importer.setInitializationErrorCallback(boost::bind(&LLFloaterMerchantItems::initializationReportError, this, _1, _2)); + importer.setStatusChangedCallback(boost::bind(&LLFloaterMerchantItems::importStatusChanged, this, _1)); + importer.setStatusReportCallback(boost::bind(&LLFloaterMerchantItems::importReportResults, this, _1, _2)); + importer.initialize(); + } } S32 LLFloaterMerchantItems::getFolderCount() @@ -1010,3 +1009,47 @@ void LLFloaterMerchantItems::onChanged() clean(); } } + +void LLFloaterMerchantItems::initializationReportError(U32 status, const LLSD& content) +{ + updateView(); +} + +void LLFloaterMerchantItems::importStatusChanged(bool inProgress) +{ + if (mRootFolderId.isNull() && (LLMarketplaceInventoryImporter::getInstance()->getMarketPlaceStatus() == MarketplaceStatusCodes::MARKET_PLACE_MERCHANT)) + { + setup(); + } + /* + if (inProgress) + { + if (mImportBusy) + { + setStatusString(getString("OutboxImporting")); + } + else + { + setStatusString(getString("OutboxInitializing")); + } + + mImportBusy = true; + mInventoryImportInProgress->setVisible(true); + } + else + { + setStatusString(""); + mImportBusy = false; + mInventoryImportInProgress->setVisible(false); + } + */ + + updateView(); +} + +void LLFloaterMerchantItems::importReportResults(U32 status, const LLSD& content) +{ + updateView(); +} + + |