diff options
author | Richard Linden <none@none> | 2012-03-16 17:36:15 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2012-03-16 17:36:15 -0700 |
commit | 8fe733df4e7893e784b8903f8e936ffb184ced44 (patch) | |
tree | e18a60361a7421701b2e8a8bb863da3c1fcf7da5 /indra | |
parent | 34c599858bd64b7fbda767ff9c9f7d8bcd2c2c25 (diff) | |
parent | 7893cc2ed9815f675b760aacc9f3bf38cec9df1a (diff) |
Automated merge with ssh://hg.lindenlab.com/richard/viewer-experience
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llfloater.cpp | 9 | ||||
-rw-r--r-- | indra/newview/app_settings/settings.xml | 11 | ||||
-rw-r--r-- | indra/newview/app_settings/settings_per_account.xml | 22 | ||||
-rw-r--r-- | indra/newview/llsidepanelinventory.cpp | 26 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/sidepanel_inventory.xml | 3 |
5 files changed, 50 insertions, 21 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index b091a4a1f7..9c4bf0a5c2 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -882,6 +882,10 @@ bool LLFloater::applyRectControl() reshape(llmax(mMinWidth, rect.getWidth()), llmax(mMinHeight, rect.getHeight())); } } + mPositioning = LLFloaterEnums::POSITIONING_RELATIVE; + LLRect screen_rect = calcScreenRect(); + mPosition = LLCoordGL(screen_rect.getCenterX(), screen_rect.getCenterY()).convert(); + storeRectControl(); } LLControlVariablePtr x_control = getControlGroup()->getControl(mPosXControl); @@ -898,11 +902,6 @@ bool LLFloater::applyRectControl() saved_rect = true; } - else - { - LLRect screen_rect = calcScreenRect(); - mPosition = LLCoordGL(screen_rect.getCenterX(), screen_rect.getCenterY()).convert(); - } } return saved_rect; 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" |