From 52aeaa32841e7d0b37abab0a2a2540c2be2f16b7 Mon Sep 17 00:00:00 2001 From: James Cook Date: Tue, 7 Jul 2009 00:53:05 +0000 Subject: Merge skinning-14 to viewer-2, including refactoring many floaters to register them with LLFloaterReg, support for introspection of ParamBlock based UI widgets to dump XML schema, splitting llfolderview.cpp into three separate files to unravel dependencies and skeleton for for LLListView widget. Resolved conflicts in these files: lldraghandle.h, lluictrl.h, llchiclet.cpp, llfolderview.h/cpp, lliinventorybridge.cpp, llpanelpicks.cpp, llviewermenu.cpp, floater_mute.xml, floater_preferences.xml, notifications.xml, panel_preferences_audio.xml, panel_preferences_graphics1.xml, panel_region_general.xml svn merge -r124961:126284 svn+ssh://svn.lindenlab.com/svn/linden/branches/skinning/skinning-14 --- indra/newview/llfloatercamera.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llfloatercamera.cpp') diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp index e79142513b..1c99776c11 100644 --- a/indra/newview/llfloatercamera.cpp +++ b/indra/newview/llfloatercamera.cpp @@ -48,11 +48,11 @@ const F32 CAMERA_BUTTON_DELAY = 0.0f; // Member functions // LLFloaterCamera::LLFloaterCamera(const LLSD& val) -: LLFloater() +: LLFloater(val) { - // For now, only used for size and tooltip strings - const BOOL DONT_OPEN = FALSE; - LLUICtrlFactory::getInstance()->buildFloater(this, "floater_camera.xml", DONT_OPEN); + //// For now, only used for size and tooltip strings + //const BOOL DONT_OPEN = FALSE; + //LLUICtrlFactory::getInstance()->buildFloater(this, "floater_camera.xml", DONT_OPEN); } // virtual -- cgit v1.3 From e4dc104e3296319476bb0d6c327d6a326c967976 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Fri, 10 Jul 2009 21:18:42 +0000 Subject: EXT-70 Camera and Movement controls don't save their positions DEV-35250 Quitting from the login screen forgets window placement and visibility (e.g. movement and camera floaters) reviewed by Leyla --- indra/llui/llfloater.cpp | 11 ++++++-- indra/llui/llfloater.h | 1 + indra/llui/llfloaterreg.cpp | 18 ++++++++++++ indra/llui/llfloaterreg.h | 1 + indra/newview/app_settings/settings.xml | 33 ---------------------- indra/newview/llfloatercamera.cpp | 17 ----------- indra/newview/llfloatercamera.h | 2 -- indra/newview/llmoveview.cpp | 15 ---------- indra/newview/llmoveview.h | 2 -- indra/newview/llstartup.cpp | 14 --------- indra/newview/llviewerfloaterreg.cpp | 2 ++ indra/newview/llviewerwindow.cpp | 1 - .../skins/default/xui/en/floater_camera.xml | 1 + .../skins/default/xui/en/floater_moveview.xml | 1 + 14 files changed, 33 insertions(+), 86 deletions(-) (limited to 'indra/newview/llfloatercamera.cpp') 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 @@ Value 0 - ShowActiveSpeakers - - Comment - Display active speakers list on login - Persist - 1 - Type - Boolean - Value - 0 - ShowAdvancedGraphicsSettings Comment @@ -6652,17 +6641,6 @@ Value 1 - ShowCameraControls - - Comment - Display camera controls on login - Persist - 1 - Type - Boolean - Value - 0 - ShowConsoleWindow Comment @@ -6985,17 +6963,6 @@ Value 0 - ShowMovementControls - - Comment - Display movement controls on login - Persist - 1 - Type - Boolean - Value - 0 - ShowNearClip Comment 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 @@ -68,16 +68,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() { @@ -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); // *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"> 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">