diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp index f9bceac34b..675686707a 100644 --- a/indra/newview/llsidepanelinventory.cpp +++ b/indra/newview/llsidepanelinventory.cpp @@ -237,6 +237,9 @@ BOOL LLSidepanelInventory::postBuild() gSavedSettings.getControl("InventoryDisplayInbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayInboxChanged)); + // Optional hiding of Received Items folder aka Inbox + gSavedSettings.getControl("FSShowInboxFolder")->getSignal()->connect(boost::bind(&LLSidepanelInventory::refreshInboxVisibility, this)); + // Update the verbs buttons state. updateVerbs(); @@ -332,9 +335,18 @@ void LLSidepanelInventory::enableInbox(bool enabled) mInboxEnabled = enabled; LLLayoutPanel * inbox_layout_panel = getChild(INBOX_LAYOUT_PANEL_NAME); - inbox_layout_panel->setVisible(enabled); + // Optional hiding of Received Items folder aka Inbox + //inbox_layout_panel->setVisible(enabled); + inbox_layout_panel->setVisible(enabled && !gSavedSettings.getBOOL("FSShowInboxFolder")); } +// Optional hiding of Received Items folder aka Inbox +void LLSidepanelInventory::refreshInboxVisibility() +{ + enableInbox(mInboxEnabled); +} +// Optional hiding of Received Items folder aka Inbox + void LLSidepanelInventory::openInbox() { if (mInboxEnabled) diff --git a/indra/newview/llsidepanelinventory.h b/indra/newview/llsidepanelinventory.h index de4d26efab..51af00979a 100644 --- a/indra/newview/llsidepanelinventory.h +++ b/indra/newview/llsidepanelinventory.h @@ -75,6 +75,9 @@ public: void onToggleInboxBtn(); void enableInbox(bool enabled); + + // Optional hiding of Received Items folder aka Inbox + void refreshInboxVisibility(); void openInbox();