summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorcallum <none@none>2010-10-14 15:18:00 -0700
committercallum <none@none>2010-10-14 15:18:00 -0700
commiteea2b8f9d3fe909befd43ca8db7878855ddd661d (patch)
tree52963f74cc6ead23e772045ae1b2d1064dcc36c3 /indra/newview
parent55d7de0df2fb3ef73c322af53745a71ed4015998 (diff)
EXP-225 FIX Add debug setting to quit the viewer after N seconds of AFK behavior.
Viewer specific setting for this feature including default value in settings file
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/app_settings/settings.xml11
-rw-r--r--indra/newview/llappviewer.cpp12
2 files changed, 23 insertions, 0 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 5c54b88927..7538b152c1 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -6403,6 +6403,17 @@
<key>Value</key>
<real>0.0</real>
</map>
+ <key>QuitAfterSecondsOfAFK</key>
+ <map>
+ <key>Comment</key>
+ <string>The duration allowed after being AFK before quitting.</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>0.0</real>
+ </map>
<key>QuitOnLoginActivated</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index a245639fac..ba3c6a5916 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -3569,6 +3569,18 @@ void LLAppViewer::idle()
}
}
+ // debug setting to quit after N seconds of being AFK - 0 to never do this
+ F32 qas_afk = gSavedSettings.getF32("QuitAfterSecondsOfAFK");
+ if (qas_afk > 0.f)
+ {
+ // idle time is more than setting
+ if ( gAwayTriggerTimer.getElapsedTimeF32() > qas_afk )
+ {
+ // go ahead and just quit
+ LLAppViewer::instance()->forceQuit();
+ }
+ }
+
// Must wait until both have avatar object and mute list, so poll
// here.
request_initial_instant_messages();