diff options
| author | Richard Linden <none@none> | 2010-12-08 16:04:07 -0800 |
|---|---|---|
| committer | Richard Linden <none@none> | 2010-12-08 16:04:07 -0800 |
| commit | ca2141ce90d484284bf57d72feb82e290958b061 (patch) | |
| tree | 0e2ea77f0b7c2a9c9f9e69c09c0be22567afac3b /indra/newview/llstartup.cpp | |
| parent | d9b4570883652d647c05083c18fac1a088efd6e2 (diff) | |
| parent | c28b476a6806a426593e6798ea537f13ca354fc8 (diff) | |
merge with viewer-dev
Diffstat (limited to 'indra/newview/llstartup.cpp')
| -rw-r--r-- | indra/newview/llstartup.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index 80cf7e3cd0..d945af0776 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -233,6 +233,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()); @@ -706,7 +708,15 @@ bool idle_startup() if (STATE_LOGIN_SHOW == LLStartUp::getStartupState()) { LL_DEBUGS("AppInit") << "Initializing Window" << LL_ENDL; - + + // 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(); + } + gViewerWindow->getWindow()->setCursor(UI_CURSOR_ARROW); timeout_count = 0; @@ -784,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. @@ -810,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()) |
