summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorSeth ProductEngine <slitovchuk@productengine.com>2012-01-19 16:57:09 +0200
committerSeth ProductEngine <slitovchuk@productengine.com>2012-01-19 16:57:09 +0200
commit19320842ebc39c1b528a2107323f9e918d688177 (patch)
tree9ecb2ef472d0617744039b854913759359708e6b /indra
parent86dc7c4f6dc2a63640b9798a2c41d5e70916d1e0 (diff)
EXP-1767 FIXED Received Items panel state being persistent between sessions.
Added a setting to store the panel state.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llsidepanelinventory.cpp10
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_inventory.xml1
3 files changed, 18 insertions, 4 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 28ba9fd704..62b8052a50 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4260,6 +4260,17 @@
<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 3761eb5777..e1043c34c7 100644
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -220,15 +220,17 @@ BOOL LLSidepanelInventory::postBuild()
// Disable user_resize on main inventory panel by default
inv_stack->setPanelUserResize(MAIN_INVENTORY_LAYOUT_PANEL_NAME, false);
- // Collapse inbox panel
- inv_stack->collapsePanel(getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME), true);
-
// Set up button states and callbacks
LLButton * inbox_button = getChild<LLButton>(INBOX_BUTTON_NAME);
- inbox_button->setToggleState(false);
inbox_button->setCommitCallback(boost::bind(&LLSidepanelInventory::onToggleInboxBtn, this));
+ // Get the previous inbox state from "InventoryInboxToggleState" setting.
+ bool is_inbox_collapsed = !inbox_button->getToggleState();
+
+ // Restore the collapsed inbox panel state
+ inv_stack->collapsePanel(getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME), is_inbox_collapsed);
+
// Set the inbox visible based on debug settings (final setting comes from http request below)
enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox"));
diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
index fcba937bdb..1e06a60f55 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
@@ -73,6 +73,7 @@
<string name="InboxLabelWithArg">Received items ([NUM])</string>
<string name="InboxLabelNoArg">Received items</string>
<button
+ control_name="InventoryInboxToggleState"
label="Received items"
font="SansSerifMedium"
name="inbox_btn"