summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-03-16 16:34:20 -0700
committerRichard Linden <none@none>2012-03-16 16:34:20 -0700
commit5e9286f523fe704e6d37c460a6a7ff5b74f9cc6d (patch)
tree5a603706c3032daf8702147f49c20f3f3d9cbc24 /indra
parentb9521a38f11dd9f44f216adb7d02263d25272572 (diff)
EXP-1767 FIX (Received Items panel state does not persist between sessions)
made received items not auto resizable save/restore received items height on collapse/expand
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/app_settings/settings_per_account.xml22
-rw-r--r--indra/newview/llsidepanelinventory.cpp26
-rw-r--r--indra/newview/skins/default/xui/en/sidepanel_inventory.xml3
4 files changed, 46 insertions, 16 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index ee659ee39e..15da381e2f 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -4304,17 +4304,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/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index 8cdd8ed838..143126b334 100644
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -33,6 +33,28 @@
<key>Value</key>
<string />
</map>
+ <key>InventoryInboxHeight</key>
+ <map>
+ <key>Comment</key>
+ <string>Inventory inbox panel height in Inventory floater.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>200</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>DisplayDestinationsOnInitialRun</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llsidepanelinventory.cpp b/indra/newview/llsidepanelinventory.cpp
index c8b67cc9ec..4f9ab318a5 100644
--- a/indra/newview/llsidepanelinventory.cpp
+++ b/indra/newview/llsidepanelinventory.cpp
@@ -78,7 +78,6 @@ static const char * const MARKETPLACE_INBOX_PANEL = "marketplace_inbox";
//
// Helpers
//
-
class LLInboxAddedObserver : public LLInventoryCategoryAddedObserver
{
public:
@@ -130,6 +129,11 @@ LLSidepanelInventory::LLSidepanelInventory()
LLSidepanelInventory::~LLSidepanelInventory()
{
+ LLLayoutPanel* inbox_layout_panel = getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME);
+
+ // Save the InventoryMainPanelHeight in settings per account
+ gSavedPerAccountSettings.setS32("InventoryInboxHeight", inbox_layout_panel->getTargetDim());
+
if (mCategoriesObserver && gInventory.containsObserver(mCategoriesObserver))
{
gInventory.removeObserver(mCategoriesObserver);
@@ -226,7 +230,12 @@ BOOL LLSidepanelInventory::postBuild()
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);
+ LLLayoutPanel* inbox_panel = getChild<LLLayoutPanel>(INBOX_LAYOUT_PANEL_NAME);
+ inv_stack->collapsePanel(inbox_panel, is_inbox_collapsed);
+ if (!is_inbox_collapsed)
+ {
+ inbox_panel->setTargetDim(gSavedPerAccountSettings.getS32("InventoryInboxHeight"));
+ }
// Set the inbox visible based on debug settings (final setting comes from http request below)
enableInbox(gSavedSettings.getBOOL("InventoryDisplayInbox"));
@@ -370,10 +379,19 @@ void LLSidepanelInventory::onToggleInboxBtn()
// Expand/collapse the indicated panel
inv_stack->collapsePanel(inboxPanel, !inbox_expanded);
- if (inbox_expanded && inboxPanel->isInVisibleChain())
+ if (inbox_expanded)
{
- gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
+ inboxPanel->setTargetDim(gSavedPerAccountSettings.getS32("InventoryInboxHeight"));
+ if (inboxPanel->isInVisibleChain())
+ {
+ gSavedPerAccountSettings.setU32("LastInventoryInboxActivity", time_corrected());
+ }
}
+ else
+ {
+ gSavedPerAccountSettings.setS32("InventoryInboxHeight", inboxPanel->getTargetDim());
+ }
+
}
void LLSidepanelInventory::onOpen(const LLSD& key)
diff --git a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
index 29e27cb146..bd6e934703 100644
--- a/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
+++ b/indra/newview/skins/default/xui/en/sidepanel_inventory.xml
@@ -51,7 +51,7 @@
<layout_panel
width="330"
layout="topleft"
- auto_resize="true"
+ auto_resize="false"
user_resize="true"
follows="left|right|top"
name="inbox_layout_panel"
@@ -105,6 +105,7 @@
[NUM] new
</text>
<panel
+ name="inbox_inventory_placeholder_panel"
follows="all"
left="10"
bottom="235"