From 45bf1debaa805b64ce30e3c0670a2e9f24d43e08 Mon Sep 17 00:00:00 2001 From: "leslie@leslie-HPz600.lindenlab.com" Date: Tue, 2 Aug 2011 13:12:39 -0700 Subject: * Fixed up outbox UI alignment to match inbox * Added outbox item count to outbox button title * Updated sync loading indicator to keep moving until http request complete * Updated outbox panel display to use user_status http get response * Removed inbox/outbox folder name hack from LLInventoryPanel --- indra/newview/llsidepanelinventory.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'indra/newview/llsidepanelinventory.cpp') diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 6f809ba3ca..41a0b57f2d 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -301,8 +301,7 @@ void LLSidepanelInventory::handleLoginComplete() observeOutboxModifications(outbox_id); // Enable the display of the outbox if it exists - //enableOutbox(true); - // leslie NOTE: Disabling outbox until we support it officially. + enableOutbox(true); } } -- cgit v1.2.3 From db45317cae8cfa700f9003541f948afc9e238303 Mon Sep 17 00:00:00 2001 From: "leslie@leslie-HPz600.lindenlab.com" Date: Fri, 5 Aug 2011 11:12:27 -0700 Subject: EXP-863 FIX -- Add Outbox sync button that performs marketplace sync EXP-908 FIX -- Hide outbox when appropriate EXP-1035 FIX -- Allow user to remove items from outbox EXP-1000 FIX -- New icon can cover long names in Received Items Panel EXP-1001 FIX -- Newness is removed on next login if you log out or crash before opening inventory panel EXP-1008 UPDATE -- Extra space at bottom of Inventory panel when Inbox/outbox not displayed * Updated "New" tag to properly display over long names per Epic's design * "New" tags now compare vs last inbox collapse time rather than expansion time * Marketplace inventory panels now have their own layout stack Reviewed by Leyla --- indra/newview/llsidepanelinventory.cpp | 96 ++++++++++++++++++++++++---------- 1 file changed, 68 insertions(+), 28 deletions(-) (limited to 'indra/newview/llsidepanelinventory.cpp') diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 41a0b57f2d..809fd0b2fa 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -66,11 +66,14 @@ static const char * const OUTBOX_BUTTON_NAME = "outbox_btn"; static const char * const INBOX_LAYOUT_PANEL_NAME = "inbox_layout_panel"; static const char * const OUTBOX_LAYOUT_PANEL_NAME = "outbox_layout_panel"; + +static const char * const INBOX_OUTBOX_LAYOUT_PANEL_NAME = "inbox_outbox_layout_panel"; static const char * const MAIN_INVENTORY_LAYOUT_PANEL_NAME = "main_inventory_layout_panel"; static const char * const INBOX_INVENTORY_PANEL = "inventory_inbox"; static const char * const OUTBOX_INVENTORY_PANEL = "inventory_outbox"; +static const char * const INBOX_OUTBOX_LAYOUT_STACK_NAME = "inbox_outbox_layout_stack"; static const char * const INVENTORY_LAYOUT_STACK_NAME = "inventory_layout_stack"; static const char * const MARKETPLACE_INBOX_PANEL = "marketplace_inbox"; @@ -233,16 +236,20 @@ BOOL LLSidepanelInventory::postBuild() // Marketplace inbox/outbox setup { - LLLayoutStack* stack = getChild(INVENTORY_LAYOUT_STACK_NAME); + LLLayoutStack* inv_stack = getChild(INVENTORY_LAYOUT_STACK_NAME); // Disable user_resize on main inventory panel by default - stack->setPanelUserResize(MAIN_INVENTORY_LAYOUT_PANEL_NAME, false); - stack->setPanelUserResize(INBOX_LAYOUT_PANEL_NAME, false); - stack->setPanelUserResize(OUTBOX_LAYOUT_PANEL_NAME, false); + inv_stack->setPanelUserResize(MAIN_INVENTORY_LAYOUT_PANEL_NAME, false); + inv_stack->setPanelUserResize(INBOX_OUTBOX_LAYOUT_PANEL_NAME, false); + + // Collapse marketplace panel by default + inv_stack->collapsePanel(getChild(INBOX_OUTBOX_LAYOUT_PANEL_NAME), true); + + LLLayoutStack* inout_stack = getChild(INBOX_OUTBOX_LAYOUT_STACK_NAME); // Collapse both inbox and outbox panels - stack->collapsePanel(getChild(INBOX_LAYOUT_PANEL_NAME), true); - stack->collapsePanel(getChild(OUTBOX_LAYOUT_PANEL_NAME), true); + inout_stack->collapsePanel(getChild(INBOX_LAYOUT_PANEL_NAME), true); + inout_stack->collapsePanel(getChild(OUTBOX_LAYOUT_PANEL_NAME), true); // Set up button states and callbacks LLButton * inbox_button = getChild(INBOX_BUTTON_NAME); @@ -386,12 +393,22 @@ void LLSidepanelInventory::enableInbox(bool enabled) { mInboxEnabled = enabled; getChild(INBOX_LAYOUT_PANEL_NAME)->setVisible(enabled); + + if (mInboxEnabled) + { + getChild(INBOX_OUTBOX_LAYOUT_PANEL_NAME)->setVisible(TRUE); + } } void LLSidepanelInventory::enableOutbox(bool enabled) { mOutboxEnabled = enabled; getChild(OUTBOX_LAYOUT_PANEL_NAME)->setVisible(enabled); + + if (mOutboxEnabled) + { + getChild(INBOX_OUTBOX_LAYOUT_PANEL_NAME)->setVisible(TRUE); + } } void LLSidepanelInventory::onInboxChanged(const LLUUID& inbox_id) @@ -410,65 +427,88 @@ void LLSidepanelInventory::onInboxChanged(const LLUUID& inbox_id) void LLSidepanelInventory::onOutboxChanged(const LLUUID& outbox_id) { - // Perhaps use this to track outbox changes? + // Expand the outbox since we have new items in it + LLPanelMarketplaceInbox * outbox = findChild(MARKETPLACE_OUTBOX_PANEL); + if (outbox) + { + getChild(OUTBOX_BUTTON_NAME)->setToggleState(true); + onToggleOutboxBtn(); + } } -bool manageInboxOutboxPanels(LLLayoutStack * stack, - LLButton * pressedButton, LLLayoutPanel * pressedPanel, - LLButton * otherButton, LLLayoutPanel * otherPanel) +bool LLSidepanelInventory::manageInboxOutboxPanels(LLButton * pressedButton, LLLayoutPanel * pressedPanel, + LLButton * otherButton, LLLayoutPanel * otherPanel) { bool expand = pressedButton->getToggleState(); bool otherExpanded = otherButton->getToggleState(); - // - // NOTE: Ideally we could have two panel sizes stored for a collapsed and expanded minimum size. - // For now, leave this code disabled because it creates some bad artifacts when expanding - // and collapsing the inbox/outbox. - // - //S32 smallMinSize = (expand ? pressedPanel->getMinDim() : otherPanel->getMinDim()); - //S32 pressedMinSize = (expand ? 2 * smallMinSize : smallMinSize); - //otherPanel->setMinDim(smallMinSize); - //pressedPanel->setMinDim(pressedMinSize); + LLLayoutStack* inv_stack = getChild(INVENTORY_LAYOUT_STACK_NAME); + LLLayoutStack* inout_stack = getChild(INBOX_OUTBOX_LAYOUT_STACK_NAME); + LLLayoutPanel* inout_panel = getChild(INBOX_OUTBOX_LAYOUT_PANEL_NAME); + // Enable user_resize on main inventory panel only when a marketplace box is expanded + inv_stack->setPanelUserResize(MAIN_INVENTORY_LAYOUT_PANEL_NAME, expand); + inv_stack->collapsePanel(inout_panel, !expand); + + // Collapse other marketplace panel if it is expanded if (expand && otherExpanded) { // Reshape pressedPanel to the otherPanel's height so we preserve the marketplace panel size pressedPanel->reshape(pressedPanel->getRect().getWidth(), otherPanel->getRect().getHeight()); - stack->collapsePanel(otherPanel, true); + inout_stack->collapsePanel(otherPanel, true); otherButton->setToggleState(false); } + else + { + // NOTE: This is an attempt to reshape the inventory panel to the proper size but it doesn't seem to propagate + // propery to the child panels. - stack->collapsePanel(pressedPanel, !expand); + S32 new_height = inout_panel->getRect().getHeight(); - // Enable user_resize on main inventory panel only when a marketplace box is expanded - stack->setPanelUserResize(MAIN_INVENTORY_LAYOUT_PANEL_NAME, expand); + if (otherPanel->getVisible()) + { + new_height -= otherPanel->getMinDim(); + } + + pressedPanel->reshape(pressedPanel->getRect().getWidth(), new_height); + } + + // Expand/collapse the indicated panel + inout_stack->collapsePanel(pressedPanel, !expand); return expand; } void LLSidepanelInventory::onToggleInboxBtn() { - LLLayoutStack* stack = getChild(INVENTORY_LAYOUT_STACK_NAME); LLButton* pressedButton = getChild(INBOX_BUTTON_NAME); LLLayoutPanel* pressedPanel = getChild(INBOX_LAYOUT_PANEL_NAME); LLButton* otherButton = getChild(OUTBOX_BUTTON_NAME); LLLayoutPanel* otherPanel = getChild(OUTBOX_LAYOUT_PANEL_NAME); - manageInboxOutboxPanels(stack, pressedButton, pressedPanel, otherButton, otherPanel); + bool inbox_expanded = manageInboxOutboxPanels(pressedButton, pressedPanel, otherButton, otherPanel); - gSavedPerAccountSettings.setString("LastInventoryInboxExpand", LLDate::now().asString()); + if (!inbox_expanded) + { + gSavedPerAccountSettings.setString("LastInventoryInboxCollapse", LLDate::now().asString()); + } } void LLSidepanelInventory::onToggleOutboxBtn() { - LLLayoutStack* stack = getChild(INVENTORY_LAYOUT_STACK_NAME); LLButton* pressedButton = getChild(OUTBOX_BUTTON_NAME); LLLayoutPanel* pressedPanel = getChild(OUTBOX_LAYOUT_PANEL_NAME); LLButton* otherButton = getChild(INBOX_BUTTON_NAME); LLLayoutPanel* otherPanel = getChild(INBOX_LAYOUT_PANEL_NAME); - manageInboxOutboxPanels(stack, pressedButton, pressedPanel, otherButton, otherPanel); + bool inbox_was_expanded = otherButton->getToggleState(); + manageInboxOutboxPanels(pressedButton, pressedPanel, otherButton, otherPanel); + + if (inbox_was_expanded) + { + gSavedPerAccountSettings.setString("LastInventoryInboxCollapse", LLDate::now().asString()); + } } void LLSidepanelInventory::onOpen(const LLSD& key) -- cgit v1.2.3 From 7b09592bf9968dfda5c4cedf4b55e0459e6bd764 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Fri, 19 Aug 2011 16:20:29 -0700 Subject: EXP-840 FIX -- Create outbox panels to help the user get started on the marketplace and to indicate drag and drop targets. EXP-858 PROGRESS -- Outbox sync failure error handling EXP-908 FIX -- Hide outbox when appropriate EXP-1062 FIX -- Add modal dialog for outbox sync complete EXP-1096 FIX -- Extra space below Received Items panel for an account that does not have a Merchant Account setup, no outbox display EXP-1104 FIX -- User can activate Merchant Outbox synch button when outbox is empty * Added separate class for outbox view to support error tag rendering * Added confirmation for sync complete. * Added different outbox messages for empty outbox, non-merchant and error: merchant but no outbox * Progress on a bunch of other fronts. --- indra/newview/llsidepanelinventory.cpp | 125 ++++++++++++++++++++++++++++++--- 1 file changed, 116 insertions(+), 9 deletions(-) (limited to 'indra/newview/llsidepanelinventory.cpp') diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 5bbd6a2d01..5ae3a30fd5 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -52,7 +52,10 @@ #include "llsidepaneltaskinfo.h" #include "llstring.h" #include "lltabcontainer.h" +#include "lltextbox.h" +#include "lltrans.h" #include "llviewermedia.h" +#include "llviewernetwork.h" #include "llweb.h" static LLRegisterPanelClassWrapper t_inventory("sidepanel_inventory"); @@ -394,22 +397,48 @@ void LLSidepanelInventory::observeOutboxModifications(const LLUUID& outboxID) void LLSidepanelInventory::enableInbox(bool enabled) { mInboxEnabled = enabled; - getChild(INBOX_LAYOUT_PANEL_NAME)->setVisible(enabled); + + LLLayoutPanel * inbox_layout_panel = getChild(INBOX_LAYOUT_PANEL_NAME); + inbox_layout_panel->setVisible(enabled); if (mInboxEnabled) { - getChild(INBOX_OUTBOX_LAYOUT_PANEL_NAME)->setVisible(TRUE); + LLLayoutPanel * inout_layout_panel = getChild(INBOX_OUTBOX_LAYOUT_PANEL_NAME); + + inout_layout_panel->setVisible(TRUE); + + if (mOutboxEnabled) + { + S32 inbox_min_dim = inbox_layout_panel->getMinDim(); + S32 outbox_min_dim = getChild(OUTBOX_LAYOUT_PANEL_NAME)->getMinDim(); + + inout_layout_panel->setMinDim(inbox_min_dim + outbox_min_dim); + } } } void LLSidepanelInventory::enableOutbox(bool enabled) { mOutboxEnabled = enabled; - getChild(OUTBOX_LAYOUT_PANEL_NAME)->setVisible(enabled); + + LLLayoutPanel * outbox_layout_panel = getChild(OUTBOX_LAYOUT_PANEL_NAME); + outbox_layout_panel->setVisible(enabled); if (mOutboxEnabled) { - getChild(INBOX_OUTBOX_LAYOUT_PANEL_NAME)->setVisible(TRUE); + LLLayoutPanel * inout_layout_panel = getChild(INBOX_OUTBOX_LAYOUT_PANEL_NAME); + + inout_layout_panel->setVisible(TRUE); + + if (mInboxEnabled) + { + S32 inbox_min_dim = getChild(INBOX_LAYOUT_PANEL_NAME)->getMinDim(); + S32 outbox_min_dim = outbox_layout_panel->getMinDim(); + + inout_layout_panel->setMinDim(inbox_min_dim + outbox_min_dim); + } + + updateOutboxUserStatus(); } } @@ -417,10 +446,18 @@ void LLSidepanelInventory::onInboxChanged(const LLUUID& inbox_id) { // Trigger a load of the entire inbox so we always know the contents and their creation dates for sorting LLInventoryModelBackgroundFetch::instance().start(inbox_id); + + // If the outbox is expanded, don't auto-expand the inbox + if (mOutboxEnabled) + { + if (getChild(OUTBOX_BUTTON_NAME)->getToggleState()) + { + return; + } + } - // Expand the inbox since we have fresh items - LLPanelMarketplaceInbox * inbox = findChild(MARKETPLACE_INBOX_PANEL); - if (inbox) + // Expand the inbox since we have fresh items and the outbox is not expanded + if (mInboxEnabled) { getChild(INBOX_BUTTON_NAME)->setToggleState(true); onToggleInboxBtn(); @@ -430,8 +467,7 @@ void LLSidepanelInventory::onInboxChanged(const LLUUID& inbox_id) void LLSidepanelInventory::onOutboxChanged(const LLUUID& outbox_id) { // Expand the outbox since we have new items in it - LLPanelMarketplaceInbox * outbox = findChild(MARKETPLACE_OUTBOX_PANEL); - if (outbox) + if (mOutboxEnabled) { getChild(OUTBOX_BUTTON_NAME)->setToggleState(true); onToggleOutboxBtn(); @@ -675,6 +711,77 @@ void LLSidepanelInventory::showInventoryPanel() updateVerbs(); } +void LLSidepanelInventory::updateOutboxUserStatus() +{ + const bool isMerchant = (gSavedSettings.getString("InventoryMarketplaceUserStatus") == "merchant"); + const bool hasOutbox = !gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX, false, false).isNull(); + + LLView * outbox_placeholder = getChild("outbox_inventory_placeholder_panel"); + LLView * outbox_placeholder_parent = outbox_placeholder->getParent(); + + LLTextBox * outbox_title_box = outbox_placeholder->getChild("outbox_inventory_placeholder_title"); + LLTextBox * outbox_text_box = outbox_placeholder->getChild("outbox_inventory_placeholder_text"); + + std::string outbox_text; + std::string outbox_title; + std::string outbox_tooltip; + + if (isMerchant) + { + if (hasOutbox) + { + outbox_text = LLTrans::getString("InventoryOutboxNoItems"); + outbox_title = LLTrans::getString("InventoryOutboxNoItemsTitle"); + outbox_tooltip = LLTrans::getString("InventoryOutboxNoItemsTooltip"); + } + else + { + outbox_text = LLTrans::getString("InventoryOutboxCreationError"); + outbox_title = LLTrans::getString("InventoryOutboxCreationErrorTitle"); + outbox_tooltip = LLTrans::getString("InventoryOutboxCreationErrorTooltip"); + } + } + else + { + // + // The string to become a merchant contains 3 URL's which need the domain name patched in. + // + + std::string domain = "secondlife.com"; + + if (!LLGridManager::getInstance()->isInProductionGrid()) + { + std::string gridLabel = LLGridManager::getInstance()->getGridLabel(); + domain = llformat("%s.lindenlab.com", utf8str_tolower(gridLabel).c_str()); + } + + LLStringUtil::format_map_t domain_arg; + domain_arg["[DOMAIN_NAME]"] = domain; + + std::string marketplace_url = LLTrans::getString("MarketplaceURL", domain_arg); + std::string marketplace_url_create = LLTrans::getString("MarketplaceURL_CreateStore", domain_arg); + std::string marketplace_url_info = LLTrans::getString("MarketplaceURL_LearnMore", domain_arg); + + LLStringUtil::format_map_t args1, args2, args3; + args1["[MARKETPLACE_URL]"] = marketplace_url; + args2["[LEARN_MORE_URL]"] = marketplace_url_info; + args3["[CREATE_STORE_URL]"] = marketplace_url_create; + + // NOTE: This is dumb, ridiculous and very finicky. The order of these is very important + // to have these three string substitutions work properly. + outbox_text = LLTrans::getString("InventoryOutboxNotMerchant", args1); + LLStringUtil::format(outbox_text, args2); + LLStringUtil::format(outbox_text, args3); + + outbox_title = LLTrans::getString("InventoryOutboxNotMerchantTitle"); + outbox_tooltip = LLTrans::getString("InventoryOutboxNotMerchantTooltip"); + } + + outbox_text_box->setValue(outbox_text); + outbox_title_box->setValue(outbox_title); + outbox_placeholder_parent->setToolTip(outbox_tooltip); +} + void LLSidepanelInventory::updateVerbs() { mInfoBtn->setEnabled(FALSE); -- cgit v1.2.3 From c2443b95d3cd9f0f26e5e8f5c2dbeb5f6c307447 Mon Sep 17 00:00:00 2001 From: "leslie@leslie-HPz600.lindenlab.com" Date: Fri, 26 Aug 2011 16:33:47 -0700 Subject: EXP-1126 FIX -- Cannot use arrow keys to scroll up and down in Inbox and Outbox EXP-1003 FIX -- Renaming a folder in Received Items panel resets the New flag for that folder EXP-1001 FIX -- Newness is removed on next login if you log out or crash before opening inventory panel EXP-857 FIX -- Add context menu entries as alternate path to populate outbox EXP-858 FIX -- Outbox sync failure error handling EXP-1158 FIX -- Viewer crash when deleting items from Outbox when some folders are open * Made inbox, outbox and inventory panels all legit tab stops for keyboard focus * Added mouse over indication on inventory panel primarily for increased clarity on outbox error messages * Disabled "Rename" option on inbox items * Added context menu option to copy/move an item to the merchant outbox * Context menu option to copy/move to outbox is visible and/or enabled/disabled when appropriate * "LastInventoryInboxCollapse" no longer written out as a setting when the panel is not visible * Fixed up collapse time check to not try to parse empty string on first load (deminishes text spam in log greatly) * Disabled double-click as a way to equip items in the inbox or outbox * Viewer code no longer removes items from the outbox after sync. We rely on the sim to do this now. * Basic outbox sync error handling now displays error messages as tooltips along with badge over item in outbox * Moved some scroll container default values out of code and into xml --- indra/newview/llsidepanelinventory.cpp | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'indra/newview/llsidepanelinventory.cpp') diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 5ae3a30fd5..9290b7ebef 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -520,14 +520,14 @@ bool LLSidepanelInventory::manageInboxOutboxPanels(LLButton * pressedButton, LLL void LLSidepanelInventory::onToggleInboxBtn() { - LLButton* pressedButton = getChild(INBOX_BUTTON_NAME); - LLLayoutPanel* pressedPanel = getChild(INBOX_LAYOUT_PANEL_NAME); - LLButton* otherButton = getChild(OUTBOX_BUTTON_NAME); - LLLayoutPanel* otherPanel = getChild(OUTBOX_LAYOUT_PANEL_NAME); + LLButton* inboxButton = getChild(INBOX_BUTTON_NAME); + LLLayoutPanel* inboxPanel = getChild(INBOX_LAYOUT_PANEL_NAME); + LLButton* outboxButton = getChild(OUTBOX_BUTTON_NAME); + LLLayoutPanel* outboxPanel = getChild(OUTBOX_LAYOUT_PANEL_NAME); - bool inbox_expanded = manageInboxOutboxPanels(pressedButton, pressedPanel, otherButton, otherPanel); + bool inbox_expanded = manageInboxOutboxPanels(inboxButton, inboxPanel, outboxButton, outboxPanel); - if (!inbox_expanded) + if (!inbox_expanded && inboxPanel->getVisible()) { gSavedPerAccountSettings.setString("LastInventoryInboxCollapse", LLDate::now().asString()); } @@ -535,15 +535,15 @@ void LLSidepanelInventory::onToggleInboxBtn() void LLSidepanelInventory::onToggleOutboxBtn() { - LLButton* pressedButton = getChild(OUTBOX_BUTTON_NAME); - LLLayoutPanel* pressedPanel = getChild(OUTBOX_LAYOUT_PANEL_NAME); - LLButton* otherButton = getChild(INBOX_BUTTON_NAME); - LLLayoutPanel* otherPanel = getChild(INBOX_LAYOUT_PANEL_NAME); + LLButton* inboxButton = getChild(INBOX_BUTTON_NAME); + LLLayoutPanel* inboxPanel = getChild(INBOX_LAYOUT_PANEL_NAME); + LLButton* outboxButton = getChild(OUTBOX_BUTTON_NAME); + LLLayoutPanel* outboxPanel = getChild(OUTBOX_LAYOUT_PANEL_NAME); - bool inbox_was_expanded = otherButton->getToggleState(); - manageInboxOutboxPanels(pressedButton, pressedPanel, otherButton, otherPanel); + bool inbox_was_expanded = inboxButton->getToggleState(); + manageInboxOutboxPanels(outboxButton, outboxPanel, inboxButton, inboxPanel); - if (inbox_was_expanded) + if (inbox_was_expanded && inboxPanel->getVisible()) { gSavedPerAccountSettings.setString("LastInventoryInboxCollapse", LLDate::now().asString()); } -- cgit v1.2.3 From 02658d9725435ee14b21183365388deacb5e88e5 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Thu, 1 Sep 2011 16:12:39 -0700 Subject: EXP-1001 FIX -- Newness is removed on next login if you log out or crash before opening inventory panel EXP-1148 FIX -- New Tags can show in incorrect locations when opening folder with drop down arrow in Received Items panel EXP-1163 FIX -- When ordering a Direct Delivery item in Basic Mode, item is not shown as new on login to Advanced mode EXP-1172 FIX -- New tags not displayed for items delivered while not logged in on next login to viewer EXP-1173 FIX -- New tags are removed for all new items when Inventory side panel is opened * New tag now set when an item folder is added to the inbox. * Update to new tag only happens when a valid date exists. * Inbox collapsed time now only set when inbox panel is in a visible chain. --- indra/newview/llsidepanelinventory.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llsidepanelinventory.cpp') diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 9290b7ebef..a8a9f4948b 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -500,7 +500,7 @@ bool LLSidepanelInventory::manageInboxOutboxPanels(LLButton * pressedButton, LLL else { // NOTE: This is an attempt to reshape the inventory panel to the proper size but it doesn't seem to propagate - // propery to the child panels. + // properly to the child panels. S32 new_height = inout_panel->getRect().getHeight(); @@ -527,7 +527,7 @@ void LLSidepanelInventory::onToggleInboxBtn() bool inbox_expanded = manageInboxOutboxPanels(inboxButton, inboxPanel, outboxButton, outboxPanel); - if (!inbox_expanded && inboxPanel->getVisible()) + if (!inbox_expanded && inboxPanel->isInVisibleChain()) { gSavedPerAccountSettings.setString("LastInventoryInboxCollapse", LLDate::now().asString()); } @@ -543,7 +543,7 @@ void LLSidepanelInventory::onToggleOutboxBtn() bool inbox_was_expanded = inboxButton->getToggleState(); manageInboxOutboxPanels(outboxButton, outboxPanel, inboxButton, inboxPanel); - if (inbox_was_expanded && inboxPanel->getVisible()) + if (inbox_was_expanded && inboxPanel->isInVisibleChain()) { gSavedPerAccountSettings.setString("LastInventoryInboxCollapse", LLDate::now().asString()); } -- cgit v1.2.3 From b3a2bd0d4d2ab633d2f8d73df5435677bcc1f5eb Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 6 Sep 2011 12:44:03 -0700 Subject: EXP-1194 FIX -- Update New tag behavior to update Newness timestamp when Received Items panel is open and do not auto open Received Items panel * The inbox no longer auto-expands under any condition. * Changed new-ness timestamp from "LastInventoryInboxCollapse" to "LastInventoryInboxExpansion" to eschew obfuscation. * "LastInventoryInboxExpansion" now saved out when user opens the panel. --- indra/newview/llsidepanelinventory.cpp | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) (limited to 'indra/newview/llsidepanelinventory.cpp') diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index a8a9f4948b..d958109927 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -64,6 +64,9 @@ static LLRegisterPanelClassWrapper t_inventory("sidepanel_ // Constants // +// No longer want the inbox panel to auto-expand since it creates issues with the "new" tag time stamp +#define AUTO_EXPAND_INBOX 0 + static const char * const INBOX_BUTTON_NAME = "inbox_btn"; static const char * const OUTBOX_BUTTON_NAME = "outbox_btn"; @@ -447,6 +450,7 @@ void LLSidepanelInventory::onInboxChanged(const LLUUID& inbox_id) // Trigger a load of the entire inbox so we always know the contents and their creation dates for sorting LLInventoryModelBackgroundFetch::instance().start(inbox_id); +#if AUTO_EXPAND_INBOX // If the outbox is expanded, don't auto-expand the inbox if (mOutboxEnabled) { @@ -455,13 +459,14 @@ void LLSidepanelInventory::onInboxChanged(const LLUUID& inbox_id) return; } } - + // Expand the inbox since we have fresh items and the outbox is not expanded if (mInboxEnabled) { getChild(INBOX_BUTTON_NAME)->setToggleState(true); onToggleInboxBtn(); - } + } +#endif } void LLSidepanelInventory::onOutboxChanged(const LLUUID& outbox_id) @@ -525,11 +530,11 @@ void LLSidepanelInventory::onToggleInboxBtn() LLButton* outboxButton = getChild(OUTBOX_BUTTON_NAME); LLLayoutPanel* outboxPanel = getChild(OUTBOX_LAYOUT_PANEL_NAME); - bool inbox_expanded = manageInboxOutboxPanels(inboxButton, inboxPanel, outboxButton, outboxPanel); + const bool inbox_expanded = manageInboxOutboxPanels(inboxButton, inboxPanel, outboxButton, outboxPanel); - if (!inbox_expanded && inboxPanel->isInVisibleChain()) + if (inbox_expanded && inboxPanel->isInVisibleChain()) { - gSavedPerAccountSettings.setString("LastInventoryInboxCollapse", LLDate::now().asString()); + gSavedPerAccountSettings.setString("LastInventoryInboxExpansion", LLDate::now().asString()); } } @@ -540,19 +545,14 @@ void LLSidepanelInventory::onToggleOutboxBtn() LLButton* outboxButton = getChild(OUTBOX_BUTTON_NAME); LLLayoutPanel* outboxPanel = getChild(OUTBOX_LAYOUT_PANEL_NAME); - bool inbox_was_expanded = inboxButton->getToggleState(); manageInboxOutboxPanels(outboxButton, outboxPanel, inboxButton, inboxPanel); - - if (inbox_was_expanded && inboxPanel->isInVisibleChain()) - { - gSavedPerAccountSettings.setString("LastInventoryInboxCollapse", LLDate::now().asString()); - } } void LLSidepanelInventory::onOpen(const LLSD& key) { LLFirstUse::newInventory(false); +#if AUTO_EXPAND_INBOX // Expand the inbox if we have fresh items LLPanelMarketplaceInbox * inbox = findChild(MARKETPLACE_INBOX_PANEL); if (inbox && (inbox->getFreshItemCount() > 0)) @@ -560,6 +560,12 @@ void LLSidepanelInventory::onOpen(const LLSD& key) getChild(INBOX_BUTTON_NAME)->setToggleState(true); onToggleInboxBtn(); } +#else + if (mInboxEnabled && getChild(INBOX_BUTTON_NAME)->getToggleState()) + { + gSavedPerAccountSettings.setString("LastInventoryInboxExpansion", LLDate::now().asString()); + } +#endif if(key.size() == 0) return; -- cgit v1.2.3 From b18390f0f8432029f4de31be912d77d527edc94e Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Tue, 6 Sep 2011 13:27:19 -0700 Subject: * Disabling outbox for now. --- indra/newview/llsidepanelinventory.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llsidepanelinventory.cpp') diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index d958109927..522de30467 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -67,6 +67,9 @@ static LLRegisterPanelClassWrapper t_inventory("sidepanel_ // No longer want the inbox panel to auto-expand since it creates issues with the "new" tag time stamp #define AUTO_EXPAND_INBOX 0 +// Temporarily disabling the outbox until we straighten out the API +#define ENABLE_MERCHANT_OUTBOX_PANEL 0 // keep in sync with ENABLE_INVENTORY_DISPLAY_OUTBOX + static const char * const INBOX_BUTTON_NAME = "inbox_btn"; static const char * const OUTBOX_BUTTON_NAME = "outbox_btn"; @@ -310,6 +313,7 @@ void LLSidepanelInventory::handleLoginComplete() enableInbox(true); } +#if ENABLE_MERCHANT_OUTBOX_PANEL // Set up observer for outbox changes, if we have an outbox already if (!outbox_id.isNull()) { @@ -318,6 +322,7 @@ void LLSidepanelInventory::handleLoginComplete() // Enable the display of the outbox if it exists enableOutbox(true); } +#endif } void LLSidepanelInventory::observeInboxOutboxCreation() -- cgit v1.2.3 From 6bb2b2cb99740a00498f5441b8a48b0bf5a04985 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Wed, 7 Sep 2011 12:45:50 -0700 Subject: EXP-1194 FIX -- Update New tag behavior to update Newness timestamp when Received Items panel is open and do not auto open Received Items panel * Updated inbox freshness time setting name to "LastInventoryInboxActivity" * New time stamp reflects time of last activity performed on the inbox by the user * Selection and opening items in the inbox both count as activity on the inbox * Focus going to the inbox panel counts as activity on the inbox * Creation date of folders now computed based on date of items being added to them * Creation date of folders no longer relies on queries for creation date, as is done during sorting * Folders are assumed to be "new" if no inbox freshness time setting is saved --- indra/newview/llsidepanelinventory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llsidepanelinventory.cpp') diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 522de30467..858639215c 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -539,7 +539,7 @@ void LLSidepanelInventory::onToggleInboxBtn() if (inbox_expanded && inboxPanel->isInVisibleChain()) { - gSavedPerAccountSettings.setString("LastInventoryInboxExpansion", LLDate::now().asString()); + gSavedPerAccountSettings.setString("LastInventoryInboxActivity", LLDate::now().asString()); } } @@ -568,7 +568,7 @@ void LLSidepanelInventory::onOpen(const LLSD& key) #else if (mInboxEnabled && getChild(INBOX_BUTTON_NAME)->getToggleState()) { - gSavedPerAccountSettings.setString("LastInventoryInboxExpansion", LLDate::now().asString()); + gSavedPerAccountSettings.setString("LastInventoryInboxActivity", LLDate::now().asString()); } #endif -- cgit v1.2.3 From 4ad3676985fa6abbb764136f1ec658ddcf296058 Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Thu, 8 Sep 2011 12:09:43 -0700 Subject: Disable merchant outbox context menu --- indra/newview/llsidepanelinventory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llsidepanelinventory.cpp') diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 858639215c..9814e5b81a 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -68,7 +68,7 @@ static LLRegisterPanelClassWrapper t_inventory("sidepanel_ #define AUTO_EXPAND_INBOX 0 // Temporarily disabling the outbox until we straighten out the API -#define ENABLE_MERCHANT_OUTBOX_PANEL 0 // keep in sync with ENABLE_INVENTORY_DISPLAY_OUTBOX +#define ENABLE_MERCHANT_OUTBOX_PANEL 0 // keep in sync with ENABLE_INVENTORY_DISPLAY_OUTBOX, ENABLE_MERCHANT_OUTBOX_CONTEXT_MENU static const char * const INBOX_BUTTON_NAME = "inbox_btn"; static const char * const OUTBOX_BUTTON_NAME = "outbox_btn"; -- cgit v1.2.3 From ba96fb5c2b6801398481a30189f991cff98fed8b Mon Sep 17 00:00:00 2001 From: Leslie Linden Date: Mon, 12 Sep 2011 16:06:58 -0700 Subject: EXP-1199 FIX -- Inbox new tag sometimes differs from recent item delivery times, sim timezone settings differences suspected. * LastInventoryInboxActivity setting now stored as the value of time_correct(), the corrected time difference (established at login) between the client and official SL time. --- indra/newview/llsidepanelinventory.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llsidepanelinventory.cpp') diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 9814e5b81a..bd62b5c101 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -539,7 +539,7 @@ void LLSidepanelInventory::onToggleInboxBtn() if (inbox_expanded && inboxPanel->isInVisibleChain()) { - gSavedPerAccountSettings.setString("LastInventoryInboxActivity", LLDate::now().asString()); + gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected()); } } @@ -568,7 +568,7 @@ void LLSidepanelInventory::onOpen(const LLSD& key) #else if (mInboxEnabled && getChild(INBOX_BUTTON_NAME)->getToggleState()) { - gSavedPerAccountSettings.setString("LastInventoryInboxActivity", LLDate::now().asString()); + gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected()); } #endif -- cgit v1.2.3