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

Ansariel 2012-03-22 19:56:35 +01:00
parent ff1a775cbe
commit 2f1fe93b11
2 changed files with 16 additions and 1 deletions

View File

@ -237,6 +237,9 @@ BOOL LLSidepanelInventory::postBuild()
gSavedSettings.getControl("InventoryDisplayInbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayInboxChanged));
// <FS:Ansariel> 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<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME);
inbox_layout_panel->setVisible(enabled);
// <FS:Ansariel> Optional hiding of Received Items folder aka Inbox
//inbox_layout_panel->setVisible(enabled);
inbox_layout_panel->setVisible(enabled && !gSavedSettings.getBOOL("FSShowInboxFolder"));
}
// <FS:Ansariel> Optional hiding of Received Items folder aka Inbox
void LLSidepanelInventory::refreshInboxVisibility()
{
enableInbox(mInboxEnabled);
}
// </FS:Ansariel> Optional hiding of Received Items folder aka Inbox
void LLSidepanelInventory::openInbox()
{
if (mInboxEnabled)

View File

@ -75,6 +75,9 @@ public:
void onToggleInboxBtn();
void enableInbox(bool enabled);
// <FS:Ansariel> Optional hiding of Received Items folder aka Inbox
void refreshInboxVisibility();
void openInbox();