summaryrefslogtreecommitdiff
path: root/indra/newview/llstartup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r--indra/newview/llstartup.cpp46
1 files changed, 41 insertions, 5 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index dab25f144b..89cc66cf33 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -56,6 +56,7 @@
#include "llerrorcontrol.h"
#include "llfloaterreg.h"
#include "llfocusmgr.h"
+#include "llfloatergridstatus.h"
#include "llfloaterimsession.h"
#include "lllocationhistory.h"
#include "llimageworker.h"
@@ -194,6 +195,7 @@
#include "llstartuplistener.h"
#include "lltoolbarview.h"
#include "llexperiencelog.h"
+#include "llcleanup.h"
#include "llstacktrace.h"
@@ -255,6 +257,7 @@ boost::scoped_ptr<LLViewerStats::PhaseMap> LLStartUp::sPhases(new LLViewerStats:
void login_show();
void login_callback(S32 option, void* userdata);
+void show_release_notes_if_required();
void show_first_run_dialog();
bool first_run_dialog_callback(const LLSD& notification, const LLSD& response);
void set_startup_status(const F32 frac, const std::string& string, const std::string& msg);
@@ -342,7 +345,7 @@ bool idle_startup()
const std::string delims (" ");
std::string system;
int begIdx, endIdx;
- std::string osString = LLAppViewer::instance()->getOSInfo().getOSStringSimple();
+ std::string osString = LLOSInfo::instance().getOSStringSimple();
begIdx = osString.find_first_not_of (delims);
endIdx = osString.find_first_of (delims, begIdx);
@@ -681,10 +684,17 @@ bool idle_startup()
}
else if (gSavedSettings.getBOOL("AutoLogin"))
{
+ // Log into last account
gRememberPassword = TRUE;
gSavedSettings.setBOOL("RememberPassword", TRUE);
show_connect_box = false;
}
+ else if (gSavedSettings.getLLSD("UserLoginInfo").size() == 3)
+ {
+ // Console provided login&password
+ gRememberPassword = gSavedSettings.getBOOL("RememberPassword");
+ show_connect_box = false;
+ }
else
{
gRememberPassword = gSavedSettings.getBOOL("RememberPassword");
@@ -708,6 +718,7 @@ bool idle_startup()
set_startup_status(0.03f, msg.c_str(), gAgent.mMOTD.c_str());
display_startup();
// LLViewerMedia::initBrowser();
+ show_release_notes_if_required();
LLStartUp::setStartupState( STATE_LOGIN_SHOW );
return FALSE;
}
@@ -755,7 +766,7 @@ bool idle_startup()
// Show the login dialog
login_show();
// connect dialog is already shown, so fill in the names
- if (gUserCredential.notNull())
+ if (gUserCredential.notNull() && !LLPanelLogin::isCredentialSet())
{
LLPanelLogin::setFields( gUserCredential, gRememberPassword);
}
@@ -819,7 +830,8 @@ bool idle_startup()
// Don't do anything. Wait for the login view to call the login_callback,
// which will push us to the next state.
- display_startup();
+
+ // display() function will be the one to run display_startup()
// Sleep so we don't spin the CPU
ms_sleep(1);
return FALSE;
@@ -956,6 +968,8 @@ bool idle_startup()
// Load media plugin cookies
LLViewerMedia::loadCookieFile();
+ LLRenderMuteList::getInstance()->loadFromFile();
+
//-------------------------------------------------
// Handle startup progress screen
//-------------------------------------------------
@@ -1449,6 +1463,7 @@ bool idle_startup()
LLGLState::checkStates();
LLGLState::checkTextureChannels();
+ LLEnvManagerNew::getInstance()->usePrefs(); // Load all presets and settings
gSky.init(initial_sun_direction);
LLGLState::checkStates();
@@ -1865,6 +1880,8 @@ bool idle_startup()
LLFloaterReg::showInitialVisibleInstances();
+ LLFloaterGridStatus::getInstance()->startGridStatusTimer();
+
display_startup();
display_startup();
@@ -2246,6 +2263,24 @@ void login_callback(S32 option, void *userdata)
}
}
+/**
+* Check if user is running a new version of the viewer.
+* Display the Release Notes if it's not overriden by the "UpdaterShowReleaseNotes" setting.
+*/
+void show_release_notes_if_required()
+{
+ static bool release_notes_shown = false;
+ if (!release_notes_shown && (LLVersionInfo::getChannelAndVersion() != gLastRunVersion)
+ && LLVersionInfo::getViewerMaturity() != LLVersionInfo::TEST_VIEWER // don't show Release Notes for the test builds
+ && gSavedSettings.getBOOL("UpdaterShowReleaseNotes")
+ && !gSavedSettings.getBOOL("FirstLoginThisInstall"))
+ {
+ LLSD info(LLAppViewer::instance()->getViewerInfo());
+ LLWeb::loadURLInternal(info["VIEWER_RELEASE_NOTES_URL"]);
+ release_notes_shown = true;
+ }
+}
+
void show_first_run_dialog()
{
LLNotificationsUtil::add("FirstRun", LLSD(), LLSD(), first_run_dialog_callback);
@@ -2732,6 +2767,7 @@ void LLStartUp::postStartupState()
stateInfo["str"] = getStartupStateString();
stateInfo["enum"] = gStartupState;
sStateWatcher->post(stateInfo);
+ gDebugInfo["StartupState"] = getStartupStateString();
}
@@ -2811,7 +2847,7 @@ void LLStartUp::initExperiences()
void LLStartUp::cleanupNameCache()
{
- LLAvatarNameCache::cleanupClass();
+ SUBSYSTEM_CLEANUP(LLAvatarNameCache);
delete gCacheName;
gCacheName = NULL;
@@ -3028,7 +3064,7 @@ bool LLStartUp::startLLProxy()
}
else
{
- LL_WARNS("Proxy") << "Invalid other HTTP proxy configuration."<< LL_ENDL;
+ LL_WARNS("Proxy") << "Invalid other HTTP proxy configuration: " << httpProxyType << LL_ENDL;
// Set the missing or wrong configuration back to something valid.
gSavedSettings.setString("HttpProxyType", "None");