From 181eaa8196d19d5d0c1db17fe27bd2bdee11525b Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Mon, 12 Dec 2011 17:22:47 -0800 Subject: EXP-1648 FIX * Merchant outbox no longer crashes for non-merchants. * Folder count is hidden for non-merchants. * Drag and drop to merchant outbox floater is disabled for non-merchants. --- indra/newview/llfloateroutbox.cpp | 38 ++++++++++++++++---------- indra/newview/skins/default/xui/en/strings.xml | 1 + 2 files changed, 24 insertions(+), 15 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloateroutbox.cpp b/indra/newview/llfloateroutbox.cpp index 972e1e8cdc..b15380d427 100644 --- a/indra/newview/llfloateroutbox.cpp +++ b/indra/newview/llfloateroutbox.cpp @@ -269,22 +269,25 @@ void LLFloaterOutbox::updateItemCount() mOutboxItemCount = item_count; - switch (mOutboxItemCount) + if (mOutboxInventoryPanel) { - case 0: mInventoryFolderCountText->setText(getString("OutboxFolderCount0")); break; - case 1: mInventoryFolderCountText->setText(getString("OutboxFolderCount1")); break; - default: + switch (mOutboxItemCount) { - std::string item_count_str = llformat("%d", mOutboxItemCount); - - LLStringUtil::format_map_t args; - args["[NUM]"] = item_count_str; - - mInventoryFolderCountText->setText(getString("OutboxFolderCountN", args)); - break; + case 0: mInventoryFolderCountText->setText(getString("OutboxFolderCount0")); break; + case 1: mInventoryFolderCountText->setText(getString("OutboxFolderCount1")); break; + default: + { + std::string item_count_str = llformat("%d", mOutboxItemCount); + + LLStringUtil::format_map_t args; + args["[NUM]"] = item_count_str; + + mInventoryFolderCountText->setText(getString("OutboxFolderCountN", args)); + break; + } } } - + mImportButton->setEnabled(mOutboxItemCount > 0); } @@ -299,7 +302,11 @@ void LLFloaterOutbox::updateView() } else { - mOutboxInventoryPanel->setVisible(FALSE); + if (mOutboxInventoryPanel) + { + mOutboxInventoryPanel->setVisible(FALSE); + } + mInventoryPlaceholder->setVisible(TRUE); std::string outbox_text; @@ -335,8 +342,9 @@ BOOL LLFloaterOutbox::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop, { // Pass drag and drop to this floater to the outbox inventory control - if (LLMarketplaceInventoryImporter::getInstance()->isImportInProgress() || - (mWindowShade && mWindowShade->isShown())) + if ((mOutboxInventoryPanel == NULL) || + (mWindowShade && mWindowShade->isShown()) || + LLMarketplaceInventoryImporter::getInstance()->isImportInProgress()) { return FALSE; } diff --git a/indra/newview/skins/default/xui/en/strings.xml b/indra/newview/skins/default/xui/en/strings.xml index 3c7465cd7c..d8da56d338 100644 --- a/indra/newview/skins/default/xui/en/strings.xml +++ b/indra/newview/skins/default/xui/en/strings.xml @@ -2042,6 +2042,7 @@ Returns a string with the requested data about the region The Second Life Marketplace offers more than one million virtual products for sale, all of them created by Residents like you. You too can create items and sell them on the Marketplace. Creating a store is easy and free of charge. [[MARKETPLACE_URL] Visit the Marketplace] + [[MARKETPLACE_LEARN_MORE_URL] Learn more about creating a store] Your outbox is empty. -- cgit v1.2.3