summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llfloateroutbox.cpp61
-rwxr-xr-xindra/newview/llfloateroutbox.h4
2 files changed, 56 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();
+}
+
+
diff --git a/indra/newview/llfloateroutbox.h b/indra/newview/llfloateroutbox.h
index b63faa860b..1b1e1e0439 100755
--- a/indra/newview/llfloateroutbox.h
+++ b/indra/newview/llfloateroutbox.h
@@ -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();