DD-7 : Initialize the Merchant Items floater checking the is a Merchant status correctly. No indication it's initializing (UI) but the code works

master
Merov Linden 2014-03-06 19:12:25 -08:00
parent a030b30d34
commit 93da0cea62
2 changed files with 56 additions and 9 deletions

View File

@ -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();
}

View File

@ -144,6 +144,10 @@ protected:
void clean();
void fetchContents();
void importReportResults(U32 status, const LLSD& content);
void importStatusChanged(bool inProgress);
void initializationReportError(U32 status, const LLSD& content);
void onClose(bool app_quitting);
void onOpen(const LLSD& key);
void onFocusReceived();