diff options
Diffstat (limited to 'indra/newview/llsidepanelinventory.cpp')
-rw-r--r-- | indra/newview/llsidepanelinventory.cpp | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index 19c8ee0123..f9e029be19 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -74,6 +74,8 @@ static const char * const OUTBOX_INVENTORY_PANEL = "inventory_outbox"; static const char * const INVENTORY_LAYOUT_STACK_NAME = "inventory_layout_stack"; +static const char * const MARKETPLACE_INBOX_PANEL = "marketplace_inbox"; + // // Helpers // @@ -104,8 +106,8 @@ LLSidepanelInventory::~LLSidepanelInventory() } void handleInventoryDisplayInboxChanged() -{
- LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory"));
+{ + LLSidepanelInventory* sidepanel_inventory = dynamic_cast<LLSidepanelInventory*>(LLSideTray::getInstance()->getPanel("sidepanel_inventory")); sidepanel_inventory->enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox")); } @@ -247,6 +249,14 @@ 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); + + // Expand the inbox since we have fresh items + LLPanelMarketplaceInbox * inbox = getChild<LLPanelMarketplaceInbox>(MARKETPLACE_INBOX_PANEL); + if (inbox && (inbox->getFreshItemCount() > 0)) + { + getChild<LLButton>(INBOX_BUTTON_NAME)->setToggleState(true); + onToggleInboxBtn(); + } } void LLSidepanelInventory::onOutboxChanged(const LLUUID& outbox_id) @@ -321,7 +331,7 @@ void LLSidepanelInventory::onOpen(const LLSD& key) LLFirstUse::newInventory(false); // Expand the inbox if we have fresh items - LLPanelMarketplaceInbox * inbox = getChild<LLPanelMarketplaceInbox>("marketplace_inbox"); + LLPanelMarketplaceInbox * inbox = getChild<LLPanelMarketplaceInbox>(MARKETPLACE_INBOX_PANEL); if (inbox && (inbox->getFreshItemCount() > 0)) { getChild<LLButton>(INBOX_BUTTON_NAME)->setToggleState(true); @@ -530,8 +540,6 @@ void LLSidepanelInventory::updateVerbs() bool LLSidepanelInventory::canShare() { - bool can_share = false; - LLPanelMainInventory* panel_main_inventory = mInventoryPanel->findChild<LLPanelMainInventory>("panel_main_inventory"); |