diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-09-13 20:06:48 +0300 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-09-13 20:06:48 +0300 |
commit | baeded61a7cc281062efdecea2c8a385c619fe74 (patch) | |
tree | 8289df9f8041f22426227456de4daf97fe749cfd /indra/llui/llfloater.cpp | |
parent | 1f46b1d87bf4664e62131e7823ab5a7fcafe4b73 (diff) |
STORM-101 FIXED Moved floater settings (rect, visibility, docked state) to account-specific XML file.
The settings are now stored to settings_per_account.xml.
This change affects all floaters having save_rect/save_visibility/save_dock_state params set to "true",
not just detached sidebar tabs as the ticket requests.
Diffstat (limited to 'indra/llui/llfloater.cpp')
-rw-r--r-- | indra/llui/llfloater.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp index 8d24150e1e..c0942cf3c7 100644 --- a/indra/llui/llfloater.cpp +++ b/indra/llui/llfloater.cpp @@ -499,7 +499,7 @@ void LLFloater::storeRectControl() { if( mRectControl.size() > 1 ) { - LLUI::sSettingGroups["floater"]->setRect( mRectControl, getRect() ); + getControlGroup()->setRect( mRectControl, getRect() ); } } @@ -507,7 +507,7 @@ void LLFloater::storeVisibilityControl() { if( !sQuitting && mVisibilityControl.size() > 1 ) { - LLUI::sSettingGroups["floater"]->setBOOL( mVisibilityControl, getVisible() ); + getControlGroup()->setBOOL( mVisibilityControl, getVisible() ); } } @@ -515,7 +515,7 @@ void LLFloater::storeDockStateControl() { if( !sQuitting && mDocStateControl.size() > 1 ) { - LLUI::sSettingGroups["floater"]->setBOOL( mDocStateControl, isDocked() ); + getControlGroup()->setBOOL( mDocStateControl, isDocked() ); } } @@ -525,7 +525,7 @@ LLRect LLFloater::getSavedRect() const if (mRectControl.size() > 1) { - rect = LLUI::sSettingGroups["floater"]->getRect(mRectControl); + rect = getControlGroup()->getRect(mRectControl); } return rect; @@ -550,6 +550,13 @@ std::string LLFloater::getControlName(const std::string& name, const LLSD& key) return ctrl_name; } +// static +LLControlGroup* LLFloater::getControlGroup() +{ + // Floater size, position, visibility, etc are saved in per-account settings. + return LLUI::sSettingGroups["account"]; +} + void LLFloater::setVisible( BOOL visible ) { LLPanel::setVisible(visible); // calls handleVisibilityChange() @@ -805,7 +812,7 @@ void LLFloater::applyRectControl() // override center if we have saved rect control if (mRectControl.size() > 1) { - const LLRect& rect = LLUI::sSettingGroups["floater"]->getRect(mRectControl); + const LLRect& rect = getControlGroup()->getRect(mRectControl); if (rect.getWidth() > 0 && rect.getHeight() > 0) { translate( rect.mLeft - getRect().mLeft, rect.mBottom - getRect().mBottom); @@ -821,7 +828,7 @@ void LLFloater::applyDockState() { if (mDocStateControl.size() > 1) { - bool dockState = LLUI::sSettingGroups["floater"]->getBOOL(mDocStateControl); + bool dockState = getControlGroup()->getBOOL(mDocStateControl); setDocked(dockState); } |