From 250049537ff72c7f8819a73024be174290080006 Mon Sep 17 00:00:00 2001 From: Inusaito Sayori Date: Wed, 7 May 2014 06:53:35 -0400 Subject: [PATCH] Feature Request: Add option to autominimize the region restart floater And Allow changing/shutting off its sound (from gui) These new options are at the bottom of System->Security preferences. --- indra/newview/app_settings/settings.xml | 13 +++++++++++++ indra/newview/ascentprefssys.cpp | 8 ++++++++ indra/newview/ascentprefssys.h | 2 ++ indra/newview/llfloaterregionrestarting.cpp | 2 +- indra/newview/llviewermessage.cpp | 5 ++++- .../default/xui/en-us/floater_region_restarting.xml | 1 + .../xui/en-us/panel_preferences_ascent_system.xml | 3 +++ 7 files changed, 32 insertions(+), 2 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 01aec311a..58bb4931e 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -904,6 +904,19 @@ Value 0 + LiruRegionRestartMinimized + + Comment + Whether or not to spawn the region restart notice minimized (Useful for sim owners and people who need to pack up before leaving) + Persist + 1 + Type + Boolean + Value + 0 + IsCOA + 1 + LiruScriptErrorsStealFocus Comment diff --git a/indra/newview/ascentprefssys.cpp b/indra/newview/ascentprefssys.cpp index 43e87134c..6ae4a634a 100644 --- a/indra/newview/ascentprefssys.cpp +++ b/indra/newview/ascentprefssys.cpp @@ -74,6 +74,7 @@ LLPrefsAscentSys::LLPrefsAscentSys() getChild("SinguCmdLineURL")->setCommitCallback(lineEditorControl); //Security ---------------------------------------------------------------------------- + getChild("UISndRestart")->setCommitCallback(lineEditorControl); //Build ------------------------------------------------------------------------------- getChild("next_owner_copy")->setCommitCallback(boost::bind(&LLPrefsAscentSys::onCommitCheckBox, this, _1, _2)); @@ -194,6 +195,8 @@ void LLPrefsAscentSys::refreshValues() mDisableClickSitOtherOwner = gSavedSettings.getBOOL("DisableClickSitOtherOwner"); mDisplayScriptJumps = gSavedSettings.getBOOL("AscentDisplayTotalScriptJumps"); mNumScriptDiff = gSavedSettings.getF32("Ascentnumscriptdiff"); + mRestartMinimized = gSavedSettings.getBOOL("LiruRegionRestartMinimized"); + mRestartSound = gSavedSettings.getString("UISndRestart"); mLandmark = gSavedPerAccountSettings.getString("EmergencyTeleportLandmark"); //Build ------------------------------------------------------------------------------- @@ -243,6 +246,9 @@ void LLPrefsAscentSys::refresh() childSetValue("SinguCmdLineAway", mCmdLineAway); childSetValue("SinguCmdLineURL", mCmdLineURL); + //Security ---------------------------------------------------------------------------- + getChildView("UISndRestart")->setValue(mRestartSound); + //Build ------------------------------------------------------------------------------- childSetValue("alpha", mAlpha); getChild("colorswatch")->setOriginal(mColor); @@ -320,6 +326,8 @@ void LLPrefsAscentSys::cancel() gSavedSettings.setBOOL("DisableClickSitOtherOwner", mDisableClickSitOtherOwner); gSavedSettings.setBOOL("AscentDisplayTotalScriptJumps", mDisplayScriptJumps); gSavedSettings.setF32("Ascentnumscriptdiff", mNumScriptDiff); + gSavedSettings.setBOOL("LiruRegionRestartMinimized", mRestartMinimized); + gSavedSettings.setString("UISndRestart", mRestartSound); gSavedPerAccountSettings.setString("EmergencyTeleportLandmark", mLandmark); //Build ------------------------------------------------------------------------------- diff --git a/indra/newview/ascentprefssys.h b/indra/newview/ascentprefssys.h index 081c2c4c4..8a8bed9e3 100644 --- a/indra/newview/ascentprefssys.h +++ b/indra/newview/ascentprefssys.h @@ -108,7 +108,9 @@ private: bool mDisableClickSit; bool mDisableClickSitOtherOwner; bool mDisplayScriptJumps; + bool mRestartMinimized; F32 mNumScriptDiff; + std::string mRestartSound; std::string mLandmark; //Build ------------------------------------------------------------------------------- diff --git a/indra/newview/llfloaterregionrestarting.cpp b/indra/newview/llfloaterregionrestarting.cpp index 4e4116016..35af32390 100644 --- a/indra/newview/llfloaterregionrestarting.cpp +++ b/indra/newview/llfloaterregionrestarting.cpp @@ -116,7 +116,7 @@ void LLFloaterRegionRestarting::draw() LLFloater::draw(); static const LLCachedControl alchemyRegionShake(gSavedSettings, "AlchemyRegionRestartShake", true); - if (!alchemyRegionShake) + if (!alchemyRegionShake || isMinimized()) // If we're minimized, leave the user alone return; const F32 SHAKE_INTERVAL = 0.025; diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 4adce648c..13cf64827 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6600,7 +6600,8 @@ void update_region_restart(const LLSD& llsdBlock) if (restarting_floater) { restarting_floater->updateTime(seconds); - restarting_floater->center(); + if (!restarting_floater->isMinimized()) + restarting_floater->center(); } else { @@ -6608,6 +6609,8 @@ void update_region_restart(const LLSD& llsdBlock) params["NAME"] = llsdBlock["NAME"]; params["SECONDS"] = (LLSD::Integer)seconds; LLFloaterRegionRestarting::showInstance(params); + if (gSavedSettings.getBOOL("LiruRegionRestartMinimized")) + LLFloaterRegionRestarting::findInstance()->setMinimized(true); } } diff --git a/indra/newview/skins/default/xui/en-us/floater_region_restarting.xml b/indra/newview/skins/default/xui/en-us/floater_region_restarting.xml index fdad11853..e9dc5c902 100644 --- a/indra/newview/skins/default/xui/en-us/floater_region_restarting.xml +++ b/indra/newview/skins/default/xui/en-us/floater_region_restarting.xml @@ -7,6 +7,7 @@ help_topic="floater_region_restarting" single_instance="true" reuse_instance="false" + can_minimize="true" title="Region Restarting"> The region you are in now diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml index bac31ede7..d14c8a21e 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_system.xml @@ -96,8 +96,11 @@ + Drop a landmark below to autoteleport there in the last 20 seconds before region restarts + Sound played when regions will restart: +