summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llui/llfloater.cpp11
-rw-r--r--indra/llui/llfloater.h1
-rw-r--r--indra/llui/llfloaterreg.cpp18
-rw-r--r--indra/llui/llfloaterreg.h1
-rw-r--r--indra/newview/app_settings/settings.xml33
-rw-r--r--indra/newview/llfloatercamera.cpp17
-rw-r--r--indra/newview/llfloatercamera.h2
-rw-r--r--indra/newview/llmoveview.cpp15
-rw-r--r--indra/newview/llmoveview.h2
-rw-r--r--indra/newview/llstartup.cpp14
-rw-r--r--indra/newview/llviewerfloaterreg.cpp2
-rw-r--r--indra/newview/llviewerwindow.cpp1
-rw-r--r--indra/newview/skins/default/xui/en/floater_camera.xml1
-rw-r--r--indra/newview/skins/default/xui/en/floater_moveview.xml1
14 files changed, 33 insertions, 86 deletions
diff --git a/indra/llui/llfloater.cpp b/indra/llui/llfloater.cpp
index e0a4c08753..f89bee6cfb 100644
--- a/indra/llui/llfloater.cpp
+++ b/indra/llui/llfloater.cpp
@@ -126,7 +126,8 @@ LLFloater::click_callback LLFloater::sButtonCallbacks[BUTTON_COUNT] =
};
LLMultiFloater* LLFloater::sHostp = NULL;
-BOOL LLFloater::sEditModeEnabled;
+BOOL LLFloater::sEditModeEnabled = FALSE;
+BOOL LLFloater::sQuitting = FALSE; // Temporary hack until onClose() behavior becomes data driven
LLFloater::handle_map_t LLFloater::sFloaterMap;
LLFloaterView* gFloaterView = NULL;
@@ -473,7 +474,8 @@ void LLFloater::storeRectControl()
void LLFloater::storeVisibilityControl()
{
- if( mVisibilityControl.size() > 1 )
+ // sQuitting is a temp hack until we standardize onClose() behavior so that it won't call this when quitting
+ if( !sQuitting && mVisibilityControl.size() > 1 )
{
LLUI::sSettingGroups["floater"]->setBOOL( mVisibilityControl, getVisible() );
}
@@ -566,6 +568,11 @@ void LLFloater::openFloater(const LLSD& key)
void LLFloater::closeFloater(bool app_quitting)
{
+ if (app_quitting)
+ {
+ LLFloater::sQuitting = true; // Temp hack until we standardize onClose()
+ }
+
// Always unminimize before trying to close.
// Most of the time the user will never see this state.
setMinimized(FALSE);
diff --git a/indra/llui/llfloater.h b/indra/llui/llfloater.h
index c639f90390..c23978b9da 100644
--- a/indra/llui/llfloater.h
+++ b/indra/llui/llfloater.h
@@ -372,6 +372,7 @@ private:
static LLMultiFloater* sHostp;
static BOOL sEditModeEnabled;
+ static BOOL sQuitting;
static std::string sButtonActiveImageNames[BUTTON_COUNT];
static std::string sButtonInactiveImageNames[BUTTON_COUNT];
static std::string sButtonPressedImageNames[BUTTON_COUNT];
diff --git a/indra/llui/llfloaterreg.cpp b/indra/llui/llfloaterreg.cpp
index faa763cea9..d12f600503 100644
--- a/indra/llui/llfloaterreg.cpp
+++ b/indra/llui/llfloaterreg.cpp
@@ -363,6 +363,24 @@ std::string LLFloaterReg::declareVisibilityControl(const std::string& name)
return controlname;
}
+//static
+void LLFloaterReg::registerControlVariables()
+{
+ // Iterate through alll registered instance names and register rect and visibility control variables
+ for (build_map_t::iterator iter = sBuildMap.begin(); iter != sBuildMap.end(); ++iter)
+ {
+ const std::string& name = iter->first;
+ if (LLUI::sSettingGroups["floater"]->controlExists(getRectControlName(name)))
+ {
+ declareRectControl(name);
+ }
+ if (LLUI::sSettingGroups["floater"]->controlExists(getVisibilityControlName(name)))
+ {
+ declareVisibilityControl(name);
+ }
+ }
+}
+
// Callbacks
// static
diff --git a/indra/llui/llfloaterreg.h b/indra/llui/llfloaterreg.h
index ef2f71ad18..7edac43c96 100644
--- a/indra/llui/llfloaterreg.h
+++ b/indra/llui/llfloaterreg.h
@@ -120,6 +120,7 @@ public:
static std::string declareRectControl(const std::string& name);
static std::string getVisibilityControlName(const std::string& name);
static std::string declareVisibilityControl(const std::string& name);
+ static void registerControlVariables();
// Callback wrappers
static void initUICtrlToFloaterVisibilityControl(LLUICtrl* ctrl, const LLSD& sdname);
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index bc2466d81b..efc19ad875 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -6597,17 +6597,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>ShowActiveSpeakers</key>
- <map>
- <key>Comment</key>
- <string>Display active speakers list on login</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>ShowAdvancedGraphicsSettings</key>
<map>
<key>Comment</key>
@@ -6652,17 +6641,6 @@
<key>Value</key>
<integer>1</integer>
</map>
- <key>ShowCameraControls</key>
- <map>
- <key>Comment</key>
- <string>Display camera controls on login</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>ShowConsoleWindow</key>
<map>
<key>Comment</key>
@@ -6985,17 +6963,6 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>ShowMovementControls</key>
- <map>
- <key>Comment</key>
- <string>Display movement controls on login</string>
- <key>Persist</key>
- <integer>1</integer>
- <key>Type</key>
- <string>Boolean</string>
- <key>Value</key>
- <integer>0</integer>
- </map>
<key>ShowNearClip</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index 1c99776c11..ee3e465832 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -67,20 +67,3 @@ BOOL LLFloaterCamera::postBuild()
return TRUE;
}
-// virtual
-void LLFloaterCamera::onOpen(const LLSD& key)
-{
- gSavedSettings.setBOOL("ShowCameraControls", TRUE);
-}
-
-// virtual
-void LLFloaterCamera::onClose(bool app_quitting)
-{
- destroy();
-
- if (!app_quitting)
- {
- gSavedSettings.setBOOL("ShowCameraControls", FALSE);
- }
-}
-
diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h
index daea9ecee1..fabe8f577e 100644
--- a/indra/newview/llfloatercamera.h
+++ b/indra/newview/llfloatercamera.h
@@ -49,8 +49,6 @@ private:
LLFloaterCamera(const LLSD& val);
~LLFloaterCamera() {};
- /*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ void onClose(bool app_quitting);
/*virtual*/ BOOL postBuild();
public:
diff --git a/indra/newview/llmoveview.cpp b/indra/newview/llmoveview.cpp
index 1ba8bdc37f..963be61d93 100644
--- a/indra/newview/llmoveview.cpp
+++ b/indra/newview/llmoveview.cpp
@@ -69,16 +69,6 @@ LLFloaterMove::LLFloaterMove(const LLSD& key)
}
// virtual
-void LLFloaterMove::onClose(bool app_quitting)
-{
- destroy();
-
- if (!app_quitting)
- {
- gSavedSettings.setBOOL("ShowMovementControls", FALSE);
- }
-}
-// virtual
BOOL LLFloaterMove::postBuild()
{
setIsChrome(TRUE);
@@ -119,11 +109,6 @@ BOOL LLFloaterMove::postBuild()
// Static member functions
//
-void LLFloaterMove::onOpen(const LLSD& key)
-{
- gSavedSettings.setBOOL("ShowMovementControls", TRUE);
-}
-
// protected static
F32 LLFloaterMove::getYawRate( F32 time )
{
diff --git a/indra/newview/llmoveview.h b/indra/newview/llmoveview.h
index de5d1ac432..250315b9f2 100644
--- a/indra/newview/llmoveview.h
+++ b/indra/newview/llmoveview.h
@@ -53,8 +53,6 @@ private:
~LLFloaterMove() {}
public:
- /*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ void onClose(bool app_quitting);
/*virtual*/ BOOL postBuild();
static F32 getYawRate(F32 time);
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 8b6124870d..f78703f58d 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1720,20 +1720,6 @@ bool idle_startup()
LLFloaterReg::showInitialVisibleInstances();
- if (gSavedSettings.getBOOL("ShowCameraControls"))
- {
- LLFloaterReg::showInstance("camera");
- }
- if (gSavedSettings.getBOOL("ShowMovementControls"))
- {
- LLFloaterReg::showInstance("moveview");
- }
-
- if (gSavedSettings.getBOOL("ShowActiveSpeakers"))
- {
- LLFloaterReg::showInstance("active_speakers");
- }
-
if (gSavedSettings.getBOOL("BeaconAlwaysOn"))
{
LLFloaterReg::showInstance("beacons");
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 6a00b9ae49..403b710459 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -177,4 +177,6 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("media_remote_ctrl", "floater_media_remote.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMediaRemoteCtrl>);
// *NOTE: Please keep these alphabetized for easier merges
+
+ LLFloaterReg::registerControlVariables(); // Make sure visibility and rect controls get preserved when saving
}
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 6f094e4b01..2caa8f2309 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1601,7 +1601,6 @@ void LLViewerWindow::initWorldUI()
// Force gFloaterWorldMap to initialize
LLFloaterReg::getInstance("world_map");
- LLFloaterReg::hideInstance("world_map");
// Force gFloaterTools to initialize
LLFloaterReg::getInstance("build");
diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml
index 7f24b11d14..343ff893e8 100644
--- a/indra/newview/skins/default/xui/en/floater_camera.xml
+++ b/indra/newview/skins/default/xui/en/floater_camera.xml
@@ -7,6 +7,7 @@
layout="topleft"
name="camera_floater"
save_rect="true"
+ save_visibility="true"
width="176">
<floater.string
name="rotate_tooltip">
diff --git a/indra/newview/skins/default/xui/en/floater_moveview.xml b/indra/newview/skins/default/xui/en/floater_moveview.xml
index 47342ffc5b..7666a2494d 100644
--- a/indra/newview/skins/default/xui/en/floater_moveview.xml
+++ b/indra/newview/skins/default/xui/en/floater_moveview.xml
@@ -7,6 +7,7 @@
layout="topleft"
name="move_floater"
save_rect="true"
+ save_visibility="true"
width="135">
<button
follows="left|bottom"