From 8282bda6036f4845226fe8f82ced855560dd8063 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Thu, 3 Jun 2010 04:33:59 -0700 Subject: Fix for the disappearing menu bar bug (#311) --- linden/indra/newview/llstartup.cpp | 14 +++++++++++++- linden/indra/newview/llstartup.h | 5 +++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index bbf55f7..4cb7061 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -233,6 +233,7 @@ static bool gUseCircuitCallbackCalled = false; EStartupState LLStartUp::gStartupState = STATE_FIRST; bool LLStartUp::mStartedOnce = false; bool LLStartUp::mShouldAutoLogin = false; +bool LLStartUp::sLoginFailed = false; // // local function declaration @@ -803,7 +804,7 @@ bool idle_startup() // *NOTE: This is where gMuteList used to get allocated before becoming LLMuteList::getInstance(). // Initialize UI - if (!gNoRender) + if (!gNoRender && !LLStartUp::getLoginFailed()) { // Initialize all our tools. Must be done after saved settings loaded. // NOTE: This also is where gToolMgr used to be instantiated before being turned into a singleton. @@ -1691,6 +1692,7 @@ bool idle_startup() exit(0); } // Bounce back to the login screen. + LLStartUp::setLoginFailed(true); LLSD args; args["ERROR_MESSAGE"] = emsg.str(); LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done); @@ -1713,6 +1715,7 @@ bool idle_startup() exit(0); } // Bounce back to the login screen. + LLStartUp::setLoginFailed(true); LLSD args; args["ERROR_MESSAGE"] = emsg.str(); LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done); @@ -2094,6 +2097,7 @@ bool idle_startup() { // Bounce back to the login screen -- MC LL_WARNS("AppInit") << "Bad login - can't connect to this region for some reason" << LL_ENDL; + LLStartUp::setLoginFailed(true); LLSD args; args["ERROR_MESSAGE"] = "Unable to connect to the current region. Try logging into a different region instead. The default login location can be set in the General tab in Preferences."; LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done); @@ -2684,6 +2688,7 @@ bool idle_startup() LLStartUp::setStartupState( STATE_STARTED ); LLStartUp::setStartedOnce(true); + LLStartUp::setLoginFailed(false); if (gSavedSettings.getBOOL("SpeedRez")) { @@ -3626,6 +3631,13 @@ void LLStartUp::setStartedOnce(bool started) } +//static +void LLStartUp::setLoginFailed(bool login_failed) +{ + sLoginFailed = login_failed; +} + + //displays the screen and cleans up UI // static void LLStartUp::resetLogin() diff --git a/linden/indra/newview/llstartup.h b/linden/indra/newview/llstartup.h index 28469d6..65bfc68 100644 --- a/linden/indra/newview/llstartup.h +++ b/linden/indra/newview/llstartup.h @@ -92,6 +92,9 @@ public: static void setStartedOnce(bool started); static bool getStartedOnce() { return mStartedOnce; }; + static void setLoginFailed(bool login_failed); + static bool getLoginFailed() { return sLoginFailed; }; + static void multimediaInit(); // Initialize LLViewerMedia multimedia engine. @@ -123,6 +126,8 @@ public: private: static bool mStartedOnce; static bool mShouldAutoLogin; + // For failed logins before mStartedOnce can be changed -- MC + static bool sLoginFailed; static std::string startupStateToString(EStartupState state); static EStartupState gStartupState; // Do not set directly, use LLStartup::setStartupState }; -- cgit v1.1