summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2023-03-08 02:41:11 +0200
committerMnikolenko Productengine <mnikolenko@productengine.com>2023-03-08 02:41:11 +0200
commit783a802abc63efd3b55d5b38c76c03d87d47bf75 (patch)
tree79d5fb25574f9c60fcb98bdedc79186844e45410 /indra/newview
parentea94cda5f5bb9a426782ee7c7aebb1095ba444c1 (diff)
SL-19359 Show Received Items panel in all new Inventory floaters
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llsidepanelinventory.cpp35
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_inventory.xml2
3 files changed, 24 insertions, 24 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 23521351ca..87b0ad8faf 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -5002,17 +5002,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>InventoryInboxToggleState</key>
- <map>
- <key>Comment</key>
- <string>Stores the open/closed state of inventory Received items panel</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>InventoryLinking</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index 3a0302e531..cfceefed26 100644
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -73,6 +73,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";
+static bool sLoginCompleted = false;
+
//
// Helpers
//
@@ -182,22 +184,30 @@ BOOL LLSidepanelInventory::postBuild()
inbox_button->setCommitCallback(boost::bind(&LLSidepanelInventory::onToggleInboxBtn, this));
- // Get the previous inbox state from "InventoryInboxToggleState" setting.
- bool is_inbox_collapsed = !inbox_button->getToggleState();
+ // For main Inventory floater: Get the previous inbox state from "InventoryInboxToggleState" setting.
+ // For additional Inventory floaters: Collapsed state is default.
+ bool is_inbox_collapsed = !inbox_button->getToggleState() || sLoginCompleted;
// Restore the collapsed inbox panel state
mInboxLayoutPanel = getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME);
- inv_stack->collapsePanel(mInboxLayoutPanel, is_inbox_collapsed);
- if (!is_inbox_collapsed)
- {
+ inv_stack->collapsePanel(mInboxLayoutPanel, is_inbox_collapsed);
+ if (!is_inbox_collapsed)
+ {
mInboxLayoutPanel->setTargetDim(gSavedPerAccountSettings.getS32("InventoryInboxHeight"));
- }
-
- // Set the inbox visible based on debug settings (final setting comes from http request below)
- enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox"));
-
- // 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));
+ }
+
+ if (sLoginCompleted)
+ {
+ //save the state of Inbox panel only for main Inventory floater
+ inbox_button->removeControlVariable();
+ inbox_button->setToggleState(false);
+ updateInbox();
+ }
+ else
+ {
+ // 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));
+ }
}
gSavedSettings.getControl("InventoryDisplayInbox")->getCommitSignal()->connect(boost::bind(&handleInventoryDisplayInboxChanged));
@@ -207,6 +217,7 @@ BOOL LLSidepanelInventory::postBuild()
void LLSidepanelInventory::updateInbox()
{
+ sLoginCompleted = true;
//
// Track inbox folder changes
//
diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
index a4b7f48c5e..dfd3e3bf9d 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
@@ -57,7 +57,7 @@
user_resize="true"
follows="left|right|top"
name="inbox_layout_panel"
- visible="false"
+ visible="true"
min_dim="35"
expanded_min_dim="90"
height="235">