Fix inbox panel randomly shown on secondary inventory window and other inbox panel quirks

master
Ansariel 2018-01-15 11:29:20 +01:00
parent 88bbcf005b
commit ba9b49f49e
3 changed files with 15 additions and 6 deletions

View File

@ -6842,7 +6842,7 @@
<key>InventoryDisplayInbox</key>
<map>
<key>Comment</key>
<string>Override received items inventory inbox display</string>
<string>UNUSED - Controlled via FSShowInboxFolder and FSAlwaysShowInboxButton: Override received items inventory inbox display</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>

View File

@ -79,6 +79,8 @@ static const char * const INBOX_LAYOUT_PANEL_NAME = "inbox_layout_panel";
static const char * const INVENTORY_LAYOUT_STACK_NAME = "inventory_layout_stack";
static const char * const MARKETPLACE_INBOX_PANEL = "marketplace_inbox";
bool LLSidepanelInventory::sInboxInitalized = false; // <FS:Ansariel> Inbox panel randomly shown on secondary inventory windows
//
// Helpers
//
@ -231,6 +233,7 @@ BOOL LLSidepanelInventory::postBuild()
}
// Received items inbox setup
if (!sInboxInitalized) // <FS:Ansariel> Inbox panel randomly shown on secondary inventory window
{
// <FS:Ansariel> FIRE-17603: Received Items button sometimes vanishing
//LLLayoutStack* inv_stack = getChild<LLLayoutStack>(INVENTORY_LAYOUT_STACK_NAME);
@ -256,20 +259,24 @@ BOOL LLSidepanelInventory::postBuild()
}
// Set the inbox visible based on debug settings (final setting comes from http request below)
enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox"));
// <FS:Ansariel> FIRE-17603: Received Items button sometimes vanishing
//enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox"));
enableInbox(!gSavedSettings.getBOOL("FSShowInboxFolder") || gSavedSettings.getBOOL("FSAlwaysShowInboxButton"));
}
// </FS:Ansariel>
// Trigger callback for after login so we can setup to track inbox changes after initial inventory load
LLAppViewer::instance()->setOnLoginCompletedCallback(boost::bind(&LLSidepanelInventory::updateInbox, this));
// <FS:Ansariel> Optional hiding of Received Items folder aka Inbox
gSavedSettings.getControl("FSShowInboxFolder")->getSignal()->connect(boost::bind(&LLSidepanelInventory::refreshInboxVisibility, this));
gSavedSettings.getControl("FSAlwaysShowInboxButton")->getSignal()->connect(boost::bind(&LLSidepanelInventory::refreshInboxVisibility, this));
sInboxInitalized = true; // <FS:Ansariel> Inbox panel randomly shown on secondary inventory window
}
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));
gSavedSettings.getControl("FSAlwaysShowInboxButton")->getSignal()->connect(boost::bind(&LLSidepanelInventory::refreshInboxVisibility, this));
//gSavedSettings.getControl("InventoryDisplayInbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayInboxChanged));
// Update the verbs buttons state.
updateVerbs();

View File

@ -134,6 +134,8 @@ private:
LLInventoryCategoriesObserver* mCategoriesObserver;
LLInboxAddedObserver* mInboxAddedObserver;
static bool sInboxInitalized; // <FS:Ansariel> Inbox panel randomly shown on secondary inventory windows
};
#endif //LL_LLSIDEPANELINVENTORY_H