summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcallum <none@none>2010-10-11 16:36:59 -0700
committercallum <none@none>2010-10-11 16:36:59 -0700
commit34ca69949fa1bc67caa8cd0f8ed85d924303567a (patch)
tree9bb0649d4f64cf73f08889d1777f625286d1627f
parent092e595b25e3e0cd27c480d864bfd894aaf3c987 (diff)
Reworked fix for EXP-167 Add option to quit instead of going back to login screen
-rw-r--r--indra/newview/llstartup.cpp18
1 files changed, 15 insertions, 3 deletions
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<LLEventPump> LLStartUp::sStateWatcher(new LLEventStream("StartupState"));
boost::scoped_ptr<LLStartupListener> 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())