summaryrefslogtreecommitdiff
path: root/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
authorsimon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com>2012-09-05 17:17:54 -0700
committersimon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com>2012-09-05 17:17:54 -0700
commit38acb45af804968a3a75e220b45ea4b1ef489633 (patch)
tree6ea9e4237149abef95a4bc550f46dacd65d98539 /indra/newview/llstartup.cpp
parent608fa855b3e8d647d22e586218a4fc12277c387e (diff)
parente3b4b3875a6d8c7857ba948a662ace4731913ecf (diff)
Merge in latest viewer-development
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r--indra/newview/llstartup.cpp75
1 files changed, 56 insertions, 19 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 77d76b99f4..1e7c325d30 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -360,6 +360,15 @@ bool idle_startup()
if ( STATE_FIRST == LLStartUp::getStartupState() )
{
+ static bool first_call = true;
+ if (first_call)
+ {
+ // Other phases get handled when startup state changes,
+ // need to capture the initial state as well.
+ LLStartUp::getPhases().startPhase(LLStartUp::getStartupStateString());
+ first_call = false;
+ }
+
gViewerWindow->showCursor();
gViewerWindow->getWindow()->setCursor(UI_CURSOR_WAIT);
@@ -719,12 +728,14 @@ bool idle_startup()
if (STATE_LOGIN_SHOW == LLStartUp::getStartupState())
{
- LL_DEBUGS("AppInit") << "Initializing Window" << LL_ENDL;
+ LL_DEBUGS("AppInit") << "Initializing Window, show_connect_box = "
+ << show_connect_box << 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") )
{
+ LL_DEBUGS("AppInit") << "taking QuitOnLoginActivated exit" << LL_ENDL;
// no requirement for notification here - just exit
LLAppViewer::instance()->earlyExitNoNotify();
}
@@ -737,6 +748,7 @@ bool idle_startup()
// this startup phase more than once.
if (gLoginMenuBarView == NULL)
{
+ LL_DEBUGS("AppInit") << "initializing menu bar" << LL_ENDL;
display_startup();
initialize_edit_menu();
initialize_spellcheck_menu();
@@ -747,11 +759,13 @@ bool idle_startup()
if (show_connect_box)
{
+ LL_DEBUGS("AppInit") << "show_connect_box on" << LL_ENDL;
// Load all the name information out of the login view
// NOTE: Hits "Attempted getFields with no login view shown" warning, since we don't
// show the login view until login_show() is called below.
if (gUserCredential.isNull())
{
+ LL_DEBUGS("AppInit") << "loading credentials from gLoginHandler" << LL_ENDL;
display_startup();
gUserCredential = gLoginHandler.initializeLoginInfo();
display_startup();
@@ -768,17 +782,28 @@ bool idle_startup()
login_show();
display_startup();
// connect dialog is already shown, so fill in the names
- if (gUserCredential.notNull())
- {
- LLPanelLogin::setFields( gUserCredential, gRememberPassword);
- }
+ if (gUserCredential.notNull())
+ {
+ LLPanelLogin::setFields( gUserCredential, gRememberPassword);
+ }
display_startup();
LLPanelLogin::giveFocus();
+ if (gSavedSettings.getBOOL("FirstLoginThisInstall"))
+ {
+ LL_INFOS("AppInit") << "FirstLoginThisInstall, calling show_first_run_dialog()" << LL_ENDL;
+ show_first_run_dialog();
+ }
+ else
+ {
+ LL_DEBUGS("AppInit") << "FirstLoginThisInstall off" << LL_ENDL;
+ }
+
LLStartUp::setStartupState( STATE_LOGIN_WAIT ); // Wait for user input
}
else
{
+ LL_DEBUGS("AppInit") << "show_connect_box off, skipping to STATE_LOGIN_CLEANUP" << LL_ENDL;
// skip directly to message template verification
LLStartUp::setStartupState( STATE_LOGIN_CLEANUP );
}
@@ -2702,9 +2727,10 @@ void LLStartUp::setStartupState( EStartupState state )
getStartupStateString() << " to " <<
startupStateToString(state) << LL_ENDL;
- sPhases->stopPhase(getStartupStateString());
+ getPhases().stopPhase(getStartupStateString());
gStartupState = state;
- sPhases->startPhase(getStartupStateString());
+ getPhases().startPhase(getStartupStateString());
+
postStartupState();
}
@@ -2821,22 +2847,33 @@ bool LLStartUp::dispatchURL()
void LLStartUp::setStartSLURL(const LLSLURL& slurl)
{
- sStartSLURL = slurl;
- LL_DEBUGS("AppInit")<<slurl.asString()<<LL_ENDL;
+ LL_DEBUGS("AppInit")<<slurl.asString()<<LL_ENDL;
- switch(slurl.getType())
- {
- case LLSLURL::HOME_LOCATION:
- case LLSLURL::LAST_LOCATION:
- case LLSLURL::LOCATION:
- gSavedSettings.setString("LoginLocation", LLSLURL::SIM_LOCATION_HOME);
+ if ( slurl.isSpatial() )
+ {
+ std::string new_start = slurl.getSLURLString();
+ LL_DEBUGS("AppInit")<<new_start<<LL_ENDL;
+ sStartSLURL = slurl;
LLPanelLogin::onUpdateStartSLURL(slurl); // updates grid if needed
- break;
- default:
- break;
- }
+
+ // remember that this is where we wanted to log in...if the login fails,
+ // the next attempt will default to the same place.
+ gSavedSettings.setString("NextLoginLocation", new_start);
+ // following a successful login, this is cleared
+ // and the default reverts to LoginLocation
+ }
+ else
+ {
+ LL_WARNS("AppInit")<<"Invalid start SLURL (ignored): "<<slurl.asString()<<LL_ENDL;
+ }
}
+// static
+LLSLURL& LLStartUp::getStartSLURL()
+{
+ return sStartSLURL;
+}
+
/**
* Read all proxy configuration settings and set up both the HTTP proxy and
* SOCKS proxy as needed.