From 2f1fe93b11dd40b51e65584f3ddd73cb6df64f4b Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 22 Mar 2012 19:56:35 +0100 Subject: [PATCH] Linked big Received Items toggle button to option to show Received Items folder in normal inventory: Toggle button now hides if Received Items are shown in inventory --- indra/newview/llsidepanelinventory.cpp | 14 +++++++++++++- indra/newview/llsidepanelinventory.h | 3 +++ 2 files changed, 16 insertions(+), 1 deletion(-) 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();