aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-06-03 04:33:59 -0700
committerJacek Antonelli2010-06-19 02:43:29 -0500
commit8282bda6036f4845226fe8f82ced855560dd8063 (patch)
tree8d98711b1a7085a0647b1b99a224d313404636a3 /linden
parentFixed your own name being highlighted in chat history (diff)
downloadmeta-impy-8282bda6036f4845226fe8f82ced855560dd8063.zip
meta-impy-8282bda6036f4845226fe8f82ced855560dd8063.tar.gz
meta-impy-8282bda6036f4845226fe8f82ced855560dd8063.tar.bz2
meta-impy-8282bda6036f4845226fe8f82ced855560dd8063.tar.xz
Fix for the disappearing menu bar bug (#311)
Diffstat (limited to 'linden')
-rw-r--r--linden/indra/newview/llstartup.cpp14
-rw-r--r--linden/indra/newview/llstartup.h5
2 files changed, 18 insertions, 1 deletions
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;
233EStartupState LLStartUp::gStartupState = STATE_FIRST; 233EStartupState LLStartUp::gStartupState = STATE_FIRST;
234bool LLStartUp::mStartedOnce = false; 234bool LLStartUp::mStartedOnce = false;
235bool LLStartUp::mShouldAutoLogin = false; 235bool LLStartUp::mShouldAutoLogin = false;
236bool LLStartUp::sLoginFailed = false;
236 237
237// 238//
238// local function declaration 239// local function declaration
@@ -803,7 +804,7 @@ bool idle_startup()
803 // *NOTE: This is where gMuteList used to get allocated before becoming LLMuteList::getInstance(). 804 // *NOTE: This is where gMuteList used to get allocated before becoming LLMuteList::getInstance().
804 805
805 // Initialize UI 806 // Initialize UI
806 if (!gNoRender) 807 if (!gNoRender && !LLStartUp::getLoginFailed())
807 { 808 {
808 // Initialize all our tools. Must be done after saved settings loaded. 809 // Initialize all our tools. Must be done after saved settings loaded.
809 // NOTE: This also is where gToolMgr used to be instantiated before being turned into a singleton. 810 // NOTE: This also is where gToolMgr used to be instantiated before being turned into a singleton.
@@ -1691,6 +1692,7 @@ bool idle_startup()
1691 exit(0); 1692 exit(0);
1692 } 1693 }
1693 // Bounce back to the login screen. 1694 // Bounce back to the login screen.
1695 LLStartUp::setLoginFailed(true);
1694 LLSD args; 1696 LLSD args;
1695 args["ERROR_MESSAGE"] = emsg.str(); 1697 args["ERROR_MESSAGE"] = emsg.str();
1696 LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done); 1698 LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done);
@@ -1713,6 +1715,7 @@ bool idle_startup()
1713 exit(0); 1715 exit(0);
1714 } 1716 }
1715 // Bounce back to the login screen. 1717 // Bounce back to the login screen.
1718 LLStartUp::setLoginFailed(true);
1716 LLSD args; 1719 LLSD args;
1717 args["ERROR_MESSAGE"] = emsg.str(); 1720 args["ERROR_MESSAGE"] = emsg.str();
1718 LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done); 1721 LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done);
@@ -2094,6 +2097,7 @@ bool idle_startup()
2094 { 2097 {
2095 // Bounce back to the login screen -- MC 2098 // Bounce back to the login screen -- MC
2096 LL_WARNS("AppInit") << "Bad login - can't connect to this region for some reason" << LL_ENDL; 2099 LL_WARNS("AppInit") << "Bad login - can't connect to this region for some reason" << LL_ENDL;
2100 LLStartUp::setLoginFailed(true);
2097 LLSD args; 2101 LLSD args;
2098 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."; 2102 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.";
2099 LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done); 2103 LLNotifications::instance().add("ErrorMessage", args, LLSD(), login_alert_done);
@@ -2684,6 +2688,7 @@ bool idle_startup()
2684 2688
2685 LLStartUp::setStartupState( STATE_STARTED ); 2689 LLStartUp::setStartupState( STATE_STARTED );
2686 LLStartUp::setStartedOnce(true); 2690 LLStartUp::setStartedOnce(true);
2691 LLStartUp::setLoginFailed(false);
2687 2692
2688 if (gSavedSettings.getBOOL("SpeedRez")) 2693 if (gSavedSettings.getBOOL("SpeedRez"))
2689 { 2694 {
@@ -3626,6 +3631,13 @@ void LLStartUp::setStartedOnce(bool started)
3626} 3631}
3627 3632
3628 3633
3634//static
3635void LLStartUp::setLoginFailed(bool login_failed)
3636{
3637 sLoginFailed = login_failed;
3638}
3639
3640
3629//displays the screen and cleans up UI 3641//displays the screen and cleans up UI
3630// static 3642// static
3631void LLStartUp::resetLogin() 3643void 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:
92 static void setStartedOnce(bool started); 92 static void setStartedOnce(bool started);
93 static bool getStartedOnce() { return mStartedOnce; }; 93 static bool getStartedOnce() { return mStartedOnce; };
94 94
95 static void setLoginFailed(bool login_failed);
96 static bool getLoginFailed() { return sLoginFailed; };
97
95 static void multimediaInit(); 98 static void multimediaInit();
96 // Initialize LLViewerMedia multimedia engine. 99 // Initialize LLViewerMedia multimedia engine.
97 100
@@ -123,6 +126,8 @@ public:
123private: 126private:
124 static bool mStartedOnce; 127 static bool mStartedOnce;
125 static bool mShouldAutoLogin; 128 static bool mShouldAutoLogin;
129 // For failed logins before mStartedOnce can be changed -- MC
130 static bool sLoginFailed;
126 static std::string startupStateToString(EStartupState state); 131 static std::string startupStateToString(EStartupState state);
127 static EStartupState gStartupState; // Do not set directly, use LLStartup::setStartupState 132 static EStartupState gStartupState; // Do not set directly, use LLStartup::setStartupState
128}; 133};