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.
This commit is contained in:
Inusaito Sayori
2014-05-07 06:53:35 -04:00
parent 76e5311320
commit 250049537f
7 changed files with 32 additions and 2 deletions

View File

@@ -904,6 +904,19 @@
<key>Value</key>
<integer>0</integer>
</map>
<key>LiruRegionRestartMinimized</key>
<map>
<key>Comment</key>
<string>Whether or not to spawn the region restart notice minimized (Useful for sim owners and people who need to pack up before leaving)</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>Boolean</string>
<key>Value</key>
<integer>0</integer>
<key>IsCOA</key>
<integer>1</integer>
</map>
<key>LiruScriptErrorsStealFocus</key>
<map>
<key>Comment</key>

View File

@@ -74,6 +74,7 @@ LLPrefsAscentSys::LLPrefsAscentSys()
getChild<LLUICtrl>("SinguCmdLineURL")->setCommitCallback(lineEditorControl);
//Security ----------------------------------------------------------------------------
getChild<LLUICtrl>("UISndRestart")->setCommitCallback(lineEditorControl);
//Build -------------------------------------------------------------------------------
getChild<LLUICtrl>("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<LLColorSwatchCtrl>("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 -------------------------------------------------------------------------------

View File

@@ -108,7 +108,9 @@ private:
bool mDisableClickSit;
bool mDisableClickSitOtherOwner;
bool mDisplayScriptJumps;
bool mRestartMinimized;
F32 mNumScriptDiff;
std::string mRestartSound;
std::string mLandmark;
//Build -------------------------------------------------------------------------------

View File

@@ -116,7 +116,7 @@ void LLFloaterRegionRestarting::draw()
LLFloater::draw();
static const LLCachedControl<bool> alchemyRegionShake(gSavedSettings, "AlchemyRegionRestartShake", true);
if (!alchemyRegionShake)
if (!alchemyRegionShake || isMinimized()) // If we're minimized, leave the user alone
return;
const F32 SHAKE_INTERVAL = 0.025;

View File

@@ -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);
}
}

View File

@@ -7,6 +7,7 @@
help_topic="floater_region_restarting"
single_instance="true"
reuse_instance="false"
can_minimize="true"
title="Region Restarting">
<string name="RegionName">
The region you are in now

View File

@@ -96,8 +96,11 @@
<check_box bottom_delta="-20" left="10" follows="top" initial_value="false" label="Display Total Script Count changes:" name="totalscriptjumps" control_name="AscentDisplayTotalScriptJumps" tool_tip="Displays script count changes in your region, dependant on the threshold you choose to the right."/>
<spinner bottom_delta="0" decimal_digits="0" follows="top" height="16" increment="1" left_delta="210" max_val="9999" min_val="1" name="ScriptJumpCount" width="50" control_name="Ascentnumscriptdiff" tool_tip="Threshold for the script jump message [Default: 100]"/>
<check_box bottom_delta="-20" left="10" follows="top" label="Restrained Love API Support (RLVa)" name="RestrainedLove" control_name="RestrainedLove" tool_tip="Allows scripts to take greater control of the viewer, if you wear compliant objects."/>
<check_box bottom_delta="-20" left="10" follows="top" label="Auto-minimize region restart notice" name="region_restart_minimized" control_name="LiruRegionRestartMinimized" tool_tip="Useful for sim owners and people who need to pack up before leaving"/>
<text name="EmergencyTeleportDesc" left="14" bottom_delta="-12" follows="top">Drop a landmark below to autoteleport there in the last 20 seconds before region restarts</text>
<drop_target control_name="EmergencyTeleportLandmark" bottom_delta="-8" left="15" height="17" name="emergency_teleport_landmark_drop" width="430"/>
<text bottom_delta="-26" follows="top" name="UISndRestartText">Sound played when regions will restart:</text>
<line_editor bottom_delta="-6" left_delta="222" follows="top" width="209" height="16" name="UISndRestart" tool_tip="Empty for no sound to play"/>
</panel>
<panel border="true" left="1" bottom="-408" height="408" width="500" label="Building" name="Building">