diff options
author | Merov Linden <merov@lindenlab.com> | 2014-04-28 21:01:57 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-04-28 21:01:57 -0700 |
commit | eeccd4c381243eb8dbbafdbaf43f30eb74b96048 (patch) | |
tree | e18ac591757c4d8613c4ac7a120b9b71fefb0c17 /indra/newview/llfloatermarketplacelistings.cpp | |
parent | f15442a82a2bfee00694b0097abdf6aeae083e14 (diff) |
DD-22 : WIP : Cleaned up error handling in GET merchant
Diffstat (limited to 'indra/newview/llfloatermarketplacelistings.cpp')
-rwxr-xr-x | indra/newview/llfloatermarketplacelistings.cpp | 44 |
1 files changed, 23 insertions, 21 deletions
diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp index e2bf9f0206..fb6ff211d1 100755 --- a/indra/newview/llfloatermarketplacelistings.cpp +++ b/indra/newview/llfloatermarketplacelistings.cpp @@ -234,7 +234,7 @@ void LLFloaterMarketplaceListings::onOpen(const LLSD& key) // // Initialize the Market Place or go update the marketplace listings // - if (LLMarketplaceData::instance().getSLMStatus() == MarketplaceStatusCodes::MARKET_PLACE_NOT_INITIALIZED) + if (LLMarketplaceData::instance().getSLMStatus() <= MarketplaceStatusCodes::MARKET_PLACE_CONNECTION_FAILURE) { initializeMarketPlace(); } @@ -350,7 +350,28 @@ void LLFloaterMarketplaceListings::setStatusString(const std::string& statusStri } void LLFloaterMarketplaceListings::updateView() -{ +{ + U32 mkt_status = LLMarketplaceData::instance().getSLMStatus(); + + // Get or create the root folder if we are a merchant and it hasn't been done already + if (mRootFolderId.isNull() && (mkt_status == MarketplaceStatusCodes::MARKET_PLACE_MERCHANT)) + { + setup(); + } + + // Update the bottom initializing status and progress dial + if (mkt_status == MarketplaceStatusCodes::MARKET_PLACE_INITIALIZING) + { + setStatusString(getString("MarketplaceListingsInitializing")); + mInventoryInitializationInProgress->setVisible(true); + } + else + { + setStatusString(""); + mInventoryInitializationInProgress->setVisible(false); + } + + // Update the middle portion : tabs or messages if (getFolderCount() > 0) { mPanelListings->setVisible(TRUE); @@ -366,26 +387,7 @@ void LLFloaterMarketplaceListings::updateView() std::string tooltip; const LLSD& subs = getMarketplaceStringSubstitutions(); - U32 mkt_status = LLMarketplaceData::instance().getSLMStatus(); - - // Get or create the root folder if we are a merchant and it hasn't been done already - if (mRootFolderId.isNull() && (mkt_status == MarketplaceStatusCodes::MARKET_PLACE_MERCHANT)) - { - setup(); - } - // Update the bottom initializing status and progress dial - if (mkt_status == MarketplaceStatusCodes::MARKET_PLACE_INITIALIZING) - { - setStatusString(getString("MarketplaceListingsInitializing")); - mInventoryInitializationInProgress->setVisible(true); - } - else - { - setStatusString(""); - mInventoryInitializationInProgress->setVisible(false); - } - // Update the top message or flip to the tabs and folders view // *TODO : check those messages and create better appropriate ones in strings.xml if (mRootFolderId.notNull()) |