From dd2eff8da2b2508d5fc46492147e015d2455f957 Mon Sep 17 00:00:00 2001 From: callum Date: Thu, 7 Oct 2010 12:08:03 -0700 Subject: EXP-167: Quit On Login Page Activated - viewer code /default setting --- indra/newview/llstartup.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index c56cacd12b..1a42500ec4 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -706,7 +706,15 @@ bool idle_startup() if (STATE_LOGIN_SHOW == LLStartUp::getStartupState()) { LL_DEBUGS("AppInit") << "Initializing Window" << LL_ENDL; - + + // if auto login is on and setting to quit if the login page is activated + // is enabled, then go ahead and exit + if ( gSavedSettings.getBOOL("AutoLogin") && gSavedSettings.getBOOL("QuitOnLoginActivated") ) + { + // no requirement for notification here - just exit + LLAppViewer::instance()->earlyExitNoNotify(); + } + gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW); timeout_count = 0; -- cgit v1.2.3 From f65bd3c1f18675910c9d49db217a1926bd04494e Mon Sep 17 00:00:00 2001 From: callum Date: Fri, 8 Oct 2010 16:41:33 -0700 Subject: Fix for Reopened EXP-167 Add option to quit instead of going back to login screen. --- indra/newview/llstartup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 1a42500ec4..d9234425b8 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -709,7 +709,7 @@ bool idle_startup() // if auto login is on and setting to quit if the login page is activated // is enabled, then go ahead and exit - if ( gSavedSettings.getBOOL("AutoLogin") && gSavedSettings.getBOOL("QuitOnLoginActivated") ) + if ( show_connect_box && gSavedSettings.getBOOL("AutoLogin") && gSavedSettings.getBOOL("QuitOnLoginActivated") ) { // no requirement for notification here - just exit LLAppViewer::instance()->earlyExitNoNotify(); -- cgit v1.2.3 From 34ca69949fa1bc67caa8cd0f8ed85d924303567a Mon Sep 17 00:00:00 2001 From: callum Date: Mon, 11 Oct 2010 16:36:59 -0700 Subject: Reworked fix for EXP-167 Add option to quit instead of going back to login screen --- indra/newview/llstartup.cpp | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'indra/newview/llstartup.cpp') diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index d9234425b8..9d66a7cd8a 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -232,6 +232,8 @@ static LLHost gFirstSim; static std::string gFirstSimSeedCap; static LLVector3 gAgentStartLookAt(1.0f, 0.f, 0.f); static std::string gAgentStartLocation = "safe"; +static bool mLoginStatePastUI = false; + boost::scoped_ptr LLStartUp::sStateWatcher(new LLEventStream("StartupState")); boost::scoped_ptr LLStartUp::sListener(new LLStartupListener()); @@ -707,9 +709,9 @@ bool idle_startup() { LL_DEBUGS("AppInit") << "Initializing Window" << LL_ENDL; - // if auto login is on and setting to quit if the login page is activated - // is enabled, then go ahead and exit - if ( show_connect_box && gSavedSettings.getBOOL("AutoLogin") && gSavedSettings.getBOOL("QuitOnLoginActivated") ) + // if we've gone backwards in the login state machine, to this state where we show the UI + // AND the debug setting to exit in this case is true, then go ahead and bail quickly + if ( mLoginStatePastUI && gSavedSettings.getBOOL("QuitOnLoginActivated") ) { // no requirement for notification here - just exit LLAppViewer::instance()->earlyExitNoNotify(); @@ -792,6 +794,11 @@ bool idle_startup() if (STATE_LOGIN_WAIT == LLStartUp::getStartupState()) { + // when we get to this state, we've already been past the login UI + // (possiblely automatically) - flag this so we can test in the + // STATE_LOGIN_SHOW state if we've gone backwards + mLoginStatePastUI = true; + // Don't do anything. Wait for the login view to call the login_callback, // which will push us to the next state. @@ -818,6 +825,11 @@ bool idle_startup() gKeyboard->resetKeys(); } + // when we get to this state, we've already been past the login UI + // (possiblely automatically) - flag this so we can test in the + // STATE_LOGIN_SHOW state if we've gone backwards + mLoginStatePastUI = true; + // save the credentials std::string userid = "unknown"; if(gUserCredential.notNull()) -- cgit v1.2.3