From 6c26fdea4d62f723c3bdbec9ded032e6d77301b8 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Mon, 19 Dec 2011 16:46:26 -0800 Subject: EXP-1741 FIX -- Learn more link goes to page not found from Outbox for user that is not a merchant an Agni EXP-1746 FIX -- Update Outbox messaging EXP-1748 FIX -- Close down on messaging with Spinner MKT-3403 support -- viewer tooltips updated to match errors in marketplace * Copy has been updated to match the design per Leo and Brooke * Marketplace URL's have also been updated * The outbox floater now reports a status string in the existing folder count control --- indra/newview/llfloateroutbox.cpp | 43 ++++++++++++++++------ indra/newview/llfloateroutbox.h | 23 +++++++----- indra/newview/llinventorybridge.cpp | 2 +- .../default/xui/en/floater_merchant_outbox.xml | 12 +++--- indra/newview/skins/default/xui/en/strings.xml | 37 ++++++++----------- 5 files changed, 68 insertions(+), 49 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index 725e521e58..239ba7ad4d 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -103,15 +103,16 @@ LLFloaterOutbox::LLFloaterOutbox(const LLSD& key) : LLFloater(key) , mCategoriesObserver(NULL) , mCategoryAddedObserver(NULL) - , mOutboxId(LLUUID::null) - , mOutboxInventoryPanel(NULL) - , mOutboxItemCount(0) + , mImportBusy(false) + , mImportButton(NULL) , mInventoryFolderCountText(NULL) , mInventoryImportInProgress(NULL) , mInventoryPlaceholder(NULL) , mInventoryText(NULL) , mInventoryTitle(NULL) - , mImportButton(NULL) + , mOutboxId(LLUUID::null) + , mOutboxInventoryPanel(NULL) + , mOutboxItemCount(0) , mWindowShade(NULL) { } @@ -251,12 +252,22 @@ void LLFloaterOutbox::setupOutbox(const LLUUID& outboxId) // Initialize the marketplace import API // + mImportBusy = true; + setStatusString(getString("OutboxInitializing")); + LLMarketplaceInventoryImporter::getInstance()->initialize(); LLMarketplaceInventoryImporter::getInstance()->setStatusChangedCallback(boost::bind(&LLFloaterOutbox::importStatusChanged, this, _1)); LLMarketplaceInventoryImporter::getInstance()->setStatusReportCallback(boost::bind(&LLFloaterOutbox::importReportResults, this, _1, _2)); } -void LLFloaterOutbox::updateItemCount() +void LLFloaterOutbox::setStatusString(const std::string& statusString) +{ + llassert(mInventoryFolderCountText != NULL); + + mInventoryFolderCountText->setText(statusString); +} + +void LLFloaterOutbox::updateFolderCount() { S32 item_count = 0; @@ -275,8 +286,8 @@ void LLFloaterOutbox::updateItemCount() { switch (mOutboxItemCount) { - case 0: mInventoryFolderCountText->setText(getString("OutboxFolderCount0")); break; - case 1: mInventoryFolderCountText->setText(getString("OutboxFolderCount1")); break; + case 0: setStatusString(getString("OutboxFolderCount0")); break; + case 1: setStatusString(getString("OutboxFolderCount1")); break; default: { std::string item_count_str = llformat("%d", mOutboxItemCount); @@ -284,7 +295,7 @@ void LLFloaterOutbox::updateItemCount() LLStringUtil::format_map_t args; args["[NUM]"] = item_count_str; - mInventoryFolderCountText->setText(getString("OutboxFolderCountN", args)); + setStatusString(getString("OutboxFolderCountN", args)); break; } } @@ -295,7 +306,10 @@ void LLFloaterOutbox::updateItemCount() void LLFloaterOutbox::updateView() { - updateItemCount(); + if (!mImportBusy) + { + updateFolderCount(); + } if (mOutboxItemCount > 0) { @@ -431,15 +445,22 @@ void LLFloaterOutbox::importStatusChanged(bool inProgress) { if (inProgress) { - mImportButton->setEnabled(false); + if (!mImportBusy) + { + setStatusString(getString("OutboxImporting")); + } + mImportBusy = true; + mImportButton->setEnabled(false); mInventoryImportInProgress->setVisible(true); } else { + mImportBusy = false; + mImportButton->setEnabled(mOutboxItemCount > 0); mInventoryImportInProgress->setVisible(false); - mImportButton->setEnabled(mOutboxItemCount > 0); + updateView(); } } diff --git a/indra/newview/llfloateroutbox.h b/indra/newview/llfloateroutbox.h index 5222db1142..5cb487be64 100644 --- a/indra/newview/llfloateroutbox.h +++ b/indra/newview/llfloateroutbox.h @@ -80,25 +80,28 @@ protected: void onImportButtonClicked(); void onOutboxChanged(); - void updateItemCount(); + void setStatusString(const std::string& statusString); + + void updateFolderCount(); void updateView(); private: LLInventoryCategoriesObserver * mCategoriesObserver; LLInventoryCategoryAddedObserver * mCategoryAddedObserver; - + + bool mImportBusy; + LLButton * mImportButton; + + LLTextBox * mInventoryFolderCountText; + LLView * mInventoryImportInProgress; + LLView * mInventoryPlaceholder; + LLTextBox * mInventoryText; + LLTextBox * mInventoryTitle; + LLUUID mOutboxId; LLInventoryPanel * mOutboxInventoryPanel; U32 mOutboxItemCount; - LLTextBox * mInventoryFolderCountText; - LLView * mInventoryImportInProgress; - LLView * mInventoryPlaceholder; - LLTextBox * mInventoryText; - LLTextBox * mInventoryTitle; - - LLButton * mImportButton; - LLWindowShade * mWindowShade; }; diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 7665ad6e88..4e26f09978 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -73,7 +73,7 @@ // Marketplace outbox current disabled #define ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU 1 -#define BLOCK_WORN_ITEMS_IN_OUTBOX 0 +#define BLOCK_WORN_ITEMS_IN_OUTBOX 1 typedef std::pair two_uuids_t; typedef std::list two_uuids_list_t; diff --git a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml index 0368601bf4..eb68339022 100644 --- a/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml +++ b/indra/newview/skins/default/xui/en/floater_merchant_outbox.xml @@ -16,6 +16,8 @@ 0 folders 1 folder [NUM] folders + Sending items... + Initializing...