diff options
author | Oz Linden <oz@lindenlab.com> | 2011-04-13 12:03:53 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-04-13 12:03:53 -0400 |
commit | 6bdfc3d0482b3bbfb55abdb71220ea19391fbe14 (patch) | |
tree | e0557f36fe0f02e0fdeb2952d2477c01a7498a63 /indra/newview/llstartup.cpp | |
parent | 19f356202a9516664c1cacb9b50e9b6e1e072375 (diff) | |
parent | c77fcfb7a8aeb2f271b050171bf0d6a9bd4c955b (diff) |
merge out changes up to but not including the STORM-610 change
Diffstat (limited to 'indra/newview/llstartup.cpp')
-rw-r--r-- | indra/newview/llstartup.cpp | 134 |
1 files changed, 54 insertions, 80 deletions
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp index dc7f4a487b..ef075f9cbb 100644 --- a/indra/newview/llstartup.cpp +++ b/indra/newview/llstartup.cpp @@ -354,11 +354,8 @@ bool idle_startup() LLStringUtil::setLocale (LLTrans::getString(system)); - if (!gNoRender) - { - //note: Removing this line will cause incorrect button size in the login screen. -- bao. - gTextureList.updateImages(0.01f) ; - } + //note: Removing this line will cause incorrect button size in the login screen. -- bao. + gTextureList.updateImages(0.01f) ; if ( STATE_FIRST == LLStartUp::getStartupState() ) { @@ -673,6 +670,7 @@ bool idle_startup() { gUserCredential = gLoginHandler.initializeLoginInfo(); } + // Previous initializeLoginInfo may have generated user credentials. Re-check them. if (gUserCredential.isNull()) { show_connect_box = TRUE; @@ -731,9 +729,9 @@ bool idle_startup() { gUserCredential = gLoginHandler.initializeLoginInfo(); } - if (gNoRender) + if (gHeadlessClient) { - LL_ERRS("AppInit") << "Need to autologin or use command line with norender!" << LL_ENDL; + LL_WARNS("AppInit") << "Waiting at connection box in headless client. Did you mean to add autologin params?" << LL_ENDL; } // Make sure the process dialog doesn't hide things gViewerWindow->setShowProgress(FALSE); @@ -940,10 +938,7 @@ bool idle_startup() gViewerWindow->getWindow()->setCursor(UI_CURSOR_WAIT); - if (!gNoRender) - { - init_start_screen(agent_location_id); - } + init_start_screen(agent_location_id); // Display the startup progress bar. gViewerWindow->setShowProgress(TRUE); @@ -974,11 +969,6 @@ bool idle_startup() // Setting initial values... LLLoginInstance* login = LLLoginInstance::getInstance(); login->setNotificationsInterface(LLNotifications::getInstance()); - if(gNoRender) - { - // HACK, skip optional updates if you're running drones - login->setSkipOptionalUpdate(true); - } login->setSerialNumber(LLAppViewer::instance()->getSerialNumber()); login->setLastExecEvent(gLastExecEvent); @@ -1262,14 +1252,11 @@ bool idle_startup() gLoginMenuBarView->setVisible( FALSE ); gLoginMenuBarView->setEnabled( FALSE ); - if (!gNoRender) - { - // direct logging to the debug console's line buffer - LLError::logToFixedBuffer(gDebugView->mDebugConsolep); - - // set initial visibility of debug console - gDebugView->mDebugConsolep->setVisible(gSavedSettings.getBOOL("ShowDebugConsole")); - } + // direct logging to the debug console's line buffer + LLError::logToFixedBuffer(gDebugView->mDebugConsolep); + + // set initial visibility of debug console + gDebugView->mDebugConsolep->setVisible(gSavedSettings.getBOOL("ShowDebugConsole")); // // Set message handlers @@ -1297,7 +1284,7 @@ bool idle_startup() //gCacheName is required for nearby chat history loading //so I just moved nearby history loading a few states further - if (!gNoRender && gSavedPerAccountSettings.getBOOL("LogShowHistory")) + if (gSavedPerAccountSettings.getBOOL("LogShowHistory")) { LLNearbyChat* nearby_chat = LLNearbyChat::getInstance(); if (nearby_chat) nearby_chat->loadHistory(); @@ -1349,18 +1336,15 @@ bool idle_startup() gAgentCamera.resetCamera(); // Initialize global class data needed for surfaces (i.e. textures) - if (!gNoRender) - { - LL_DEBUGS("AppInit") << "Initializing sky..." << LL_ENDL; - // Initialize all of the viewer object classes for the first time (doing things like texture fetches. - LLGLState::checkStates(); - LLGLState::checkTextureChannels(); + LL_DEBUGS("AppInit") << "Initializing sky..." << LL_ENDL; + // Initialize all of the viewer object classes for the first time (doing things like texture fetches. + LLGLState::checkStates(); + LLGLState::checkTextureChannels(); - gSky.init(initial_sun_direction); + gSky.init(initial_sun_direction); - LLGLState::checkStates(); - LLGLState::checkTextureChannels(); - } + LLGLState::checkStates(); + LLGLState::checkTextureChannels(); LL_DEBUGS("AppInit") << "Decoding images..." << LL_ENDL; // For all images pre-loaded into viewer cache, decode them. @@ -1720,46 +1704,43 @@ bool idle_startup() LLUIColorTable::instance().saveUserSettings(); }; - if (!gNoRender) - { - // JC: Initializing audio requests many sounds for download. - init_audio(); - - // JC: Initialize "active" gestures. This may also trigger - // many gesture downloads, if this is the user's first - // time on this machine or -purge has been run. - LLSD gesture_options - = LLLoginInstance::getInstance()->getResponse("gestures"); - if (gesture_options.isDefined()) + // JC: Initializing audio requests many sounds for download. + init_audio(); + + // JC: Initialize "active" gestures. This may also trigger + // many gesture downloads, if this is the user's first + // time on this machine or -purge has been run. + LLSD gesture_options + = LLLoginInstance::getInstance()->getResponse("gestures"); + if (gesture_options.isDefined()) + { + LL_DEBUGS("AppInit") << "Gesture Manager loading " << gesture_options.size() + << LL_ENDL; + uuid_vec_t item_ids; + for(LLSD::array_const_iterator resp_it = gesture_options.beginArray(), + end = gesture_options.endArray(); resp_it != end; ++resp_it) { - LL_DEBUGS("AppInit") << "Gesture Manager loading " << gesture_options.size() - << LL_ENDL; - uuid_vec_t item_ids; - for(LLSD::array_const_iterator resp_it = gesture_options.beginArray(), - end = gesture_options.endArray(); resp_it != end; ++resp_it) - { - // If the id is not specifed in the LLSD, - // the LLSD operator[]() will return a null LLUUID. - LLUUID item_id = (*resp_it)["item_id"]; - LLUUID asset_id = (*resp_it)["asset_id"]; + // If the id is not specifed in the LLSD, + // the LLSD operator[]() will return a null LLUUID. + LLUUID item_id = (*resp_it)["item_id"]; + LLUUID asset_id = (*resp_it)["asset_id"]; - if (item_id.notNull() && asset_id.notNull()) - { - // Could schedule and delay these for later. - const BOOL no_inform_server = FALSE; - const BOOL no_deactivate_similar = FALSE; - LLGestureMgr::instance().activateGestureWithAsset(item_id, asset_id, - no_inform_server, - no_deactivate_similar); - // We need to fetch the inventory items for these gestures - // so we have the names to populate the UI. - item_ids.push_back(item_id); - } + if (item_id.notNull() && asset_id.notNull()) + { + // Could schedule and delay these for later. + const BOOL no_inform_server = FALSE; + const BOOL no_deactivate_similar = FALSE; + LLGestureMgr::instance().activateGestureWithAsset(item_id, asset_id, + no_inform_server, + no_deactivate_similar); + // We need to fetch the inventory items for these gestures + // so we have the names to populate the UI. + item_ids.push_back(item_id); } - // no need to add gesture to inventory observer, it's already made in constructor - LLGestureMgr::instance().setFetchIDs(item_ids); - LLGestureMgr::instance().startFetch(); } + // no need to add gesture to inventory observer, it's already made in constructor + LLGestureMgr::instance().setFetchIDs(item_ids); + LLGestureMgr::instance().startFetch(); } gDisplaySwapBuffers = TRUE; @@ -1780,13 +1761,6 @@ bool idle_startup() // JC - 7/20/2002 gViewerWindow->sendShapeToSim(); - - // Ignore stipend information for now. Money history is on the web site. - // if needed, show the L$ history window - //if (stipend_since_login && !gNoRender) - //{ - //} - // The reason we show the alert is because we want to // reduce confusion for when you log in and your provided // location is not your expected location. So, if this is @@ -2715,7 +2689,7 @@ bool LLStartUp::dispatchURL() || (dx*dx > SLOP*SLOP) || (dy*dy > SLOP*SLOP) ) { - LLURLDispatcher::dispatch(getStartSLURL().getSLURLString(), + LLURLDispatcher::dispatch(getStartSLURL().getSLURLString(), "clicked", NULL, false); } return true; @@ -3212,7 +3186,7 @@ bool process_login_success_response() void transition_back_to_login_panel(const std::string& emsg) { - if (gNoRender) + if (gHeadlessClient && gSavedSettings.getBOOL("AutoLogin")) { LL_WARNS("AppInit") << "Failed to login!" << LL_ENDL; LL_WARNS("AppInit") << emsg << LL_ENDL; |