From 0e3341917336eb194ebb2cf0b69d5cc654ed0254 Mon Sep 17 00:00:00 2001 From: Arrehn Date: Thu, 14 Apr 2011 22:33:20 -0400 Subject: [PATCH] FIRE-217 Option to movelock-sit when idling away. AFK cleanup, Preferences Cleanup --- indra/newview/app_settings/settings.xml | 36 +++++++++-------- indra/newview/llagent.cpp | 19 ++++++++- .../xui/en/panel_preferences_general.xml | 39 +++++++++++++------ 3 files changed, 64 insertions(+), 30 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 6fe9d4c961..f16a09c062 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -3,6 +3,18 @@ xsi:noNamespaceSchemaLocation="llsd.xsd"> + AvatarSitOnAway + + Comment + Sit down when marked AFK + Persist + 1 + Type + Boolean + Value + 0 + + ShowViewerIDsOnNameTag Comment @@ -12,7 +24,7 @@ Type Boolean Value - 1 + 1 PhoenixOOCPrefix @@ -48,7 +60,7 @@ Type Boolean Value - 1 + 1 ShowScriptDialogsTopRight @@ -7053,19 +7065,7 @@ Change of this parameter will affect the layout of buttons in notification toast 0 - QuitAfterSecondsOfAFK - - Comment - The duration allowed after being AFK before quitting. - Persist - 1 - Type - F32 - Value - 1800.0 - - - QuitAfterSeconds + QuitAfterSeconds Comment The duration allowed before quitting. @@ -7074,8 +7074,9 @@ Change of this parameter will affect the layout of buttons in notification toast Type F32 Value - 0.0 + -1.0 + QuitAfterSecondsOfAFK Comment @@ -7085,8 +7086,9 @@ Change of this parameter will affect the layout of buttons in notification toast Type F32 Value - 0.0 + 1800 + QuitOnLoginActivated Comment diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 3ab4648ee5..01e8e37ea0 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1176,7 +1176,7 @@ void LLAgent::setAFK() if (!(mControlFlags & AGENT_CONTROL_AWAY)) { - llinfos << "AFK DEBUG: Setting AFK" << llendl; + llinfos << "Setting AFK" << llendl; sendAnimationRequest(ANIM_AGENT_AWAY, ANIM_REQUEST_START); setControlFlags(AGENT_CONTROL_AWAY | AGENT_CONTROL_STOP); gAwayTimer.start(); @@ -1184,6 +1184,14 @@ void LLAgent::setAFK() { gAFKMenu->setLabel(LLTrans::getString("AvatarSetNotAway")); } + + // Gsit on away, antigrief protection + if (gSavedSettings.getBOOL("AvatarSitOnAway") == TRUE) + { + if (!gAgentAvatarp->isSitting() && !gRlvHandler.hasBehaviour(RLV_BHVR_SIT)) + gAgent.sitDown(); + } + // } } @@ -1206,6 +1214,15 @@ void LLAgent::clearAFK() { gAFKMenu->setLabel(LLTrans::getString("AvatarSetAway")); } + + // if we sat while away, stand back up on clear + if (gSavedSettings.getBOOL("AvatarSitOnAway") == TRUE) + { + if (gAgentAvatarp->isSitting() && !gRlvHandler.hasBehaviour(RLV_BHVR_UNSIT)) + gAgent.standUp(); + } + // + } } diff --git a/indra/newview/skins/default/xui/en/panel_preferences_general.xml b/indra/newview/skins/default/xui/en/panel_preferences_general.xml index 913b55501e..a56e6c31c9 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_general.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_general.xml @@ -188,7 +188,7 @@ layout="topleft" name="start_location_combo" left="35" - width="100"> + width="150"> @@ -351,23 +351,23 @@ follows="left|top" height="13" layout="topleft" - left_pad="50" + left_pad="5" top_delta="0" name="title_afk_quit_text" width="190"> - Log out after being away: + Log out after being marked away: - + + width="120"> + width="120"> + + value="999999999" /> + + Autoresponse response (for busy and autorespond online status): @@ -444,6 +458,7 @@ height="42" layout="topleft" left="50" + top_pad="10" name="busy_response" width="450" word_wrap="true">