Remove gAllowIdleAFK (makes the general preferences checkbox functional)

This commit is contained in:
Lirusaito
2013-02-11 15:01:18 -05:00
parent 2d0e3daef3
commit 491af1cbf0
4 changed files with 6 additions and 10 deletions

View File

@@ -243,7 +243,6 @@ const F32 DEFAULT_AFK_TIMEOUT = 5.f * 60.f; // time with no input before user fl
F32 gSimLastTime; // Used in LLAppViewer::init and send_stats()
F32 gSimFrames;
BOOL gAllowIdleAFK = FALSE;
BOOL gAllowTapTapHoldRun = TRUE;
BOOL gShowObjectUpdates = FALSE;
BOOL gUseQuickTime = TRUE;
@@ -397,15 +396,16 @@ LLAppViewer::LLUpdaterInfo *LLAppViewer::sUpdaterInfo = NULL ;
void idle_afk_check()
{
static const LLCachedControl<bool> allow_idk_afk("AllowIdleAFK");
// check idle timers
static const LLCachedControl<F32> afk_timeout("AFKTimeout",0.f);
//if (gAllowIdleAFK && (gAwayTriggerTimer.getElapsedTimeF32() > gSavedSettings.getF32("AFKTimeout")))
//if (allow_idk_afk && (gAwayTriggerTimer.getElapsedTimeF32() > gSavedSettings.getF32("AFKTimeout")))
// [RLVa:KB] - Checked: 2009-10-19 (RLVa-1.1.0g) | Added: RLVa-1.1.0g
#ifdef RLV_EXTENSION_CMD_ALLOWIDLE
if ( (gAllowIdleAFK || gRlvHandler.hasBehaviour(RLV_BHVR_ALLOWIDLE)) &&
if ( (allow_idk_afk || gRlvHandler.hasBehaviour(RLV_BHVR_ALLOWIDLE)) &&
(gAwayTriggerTimer.getElapsedTimeF32() > afk_timeout) && (afk_timeout > 0))
#else
if (gAllowIdleAFK && (gAwayTriggerTimer.getElapsedTimeF32() > afk_timeout) && (afk_timeout > 0))
if (allow_idk_afk && (gAwayTriggerTimer.getElapsedTimeF32() > afk_timeout) && (afk_timeout > 0))
#endif // RLV_EXTENSION_CMD_ALLOWIDLE
// [/RLVa:KB]
{
@@ -504,7 +504,6 @@ static void settings_to_globals()
gAgent.setHideGroupTitle(gSavedSettings.getBOOL("RenderHideGroupTitle"));
gDebugWindowProc = gSavedSettings.getBOOL("DebugWindowProc");
gAllowIdleAFK = gSavedSettings.getBOOL("AllowIdleAFK");
gAllowTapTapHoldRun = gSavedSettings.getBOOL("AllowTapTapHoldRun");
gShowObjectUpdates = gSavedSettings.getBOOL("ShowObjectUpdates");
LLWorldMapView::sMapScale = llmax(.1f,gSavedSettings.getF32("MapScale"));
@@ -2678,7 +2677,6 @@ void LLAppViewer::cleanupSavedSettings()
gSavedSettings.setBOOL("DebugWindowProc", gDebugWindowProc);
gSavedSettings.setBOOL("AllowIdleAFK", gAllowIdleAFK);
gSavedSettings.setBOOL("AllowTapTapHoldRun", gAllowTapTapHoldRun);
gSavedSettings.setBOOL("ShowObjectUpdates", gShowObjectUpdates);

View File

@@ -275,7 +275,6 @@ const S32 AGENT_UPDATES_PER_SECOND = 10;
extern LLSD gDebugInfo;
extern BOOL gAllowIdleAFK;
extern BOOL gAllowTapTapHoldRun;
extern BOOL gShowObjectUpdates;

View File

@@ -1621,8 +1621,7 @@ void init_debug_avatar_menu(LLMenuGL* menu)
{
LLMenuGL* sub_menu = new LLMenuGL("Character Tests");
sub_menu->setCanTearOff(TRUE);
sub_menu->addChild(new LLMenuItemToggleGL("Go Away/AFK When Idle",
&gAllowIdleAFK));
sub_menu->addChild(new LLMenuItemCheckGL("Go Away/AFK When Idle", menu_toggle_control, NULL, menu_check_control, (void*)"AllowIdleAFK"));
sub_menu->addChild(new LLMenuItemCallGL("Appearance To XML",
&handle_dump_archetype_xml,&enable_dump_archetype_xm));

View File

@@ -1261,7 +1261,7 @@ BOOL LLViewerWindow::handleActivate(LLWindow *window, BOOL activated)
else
{
mActive = FALSE;
if (gAllowIdleAFK)
if (gSavedSettings.getBOOL("AllowIdleAFK"))
{
gAgent.setAFK();
}