diff options
author | James Cook <james@lindenlab.com> | 2010-03-29 16:55:22 -0700 |
---|---|---|
committer | James Cook <james@lindenlab.com> | 2010-03-29 16:55:22 -0700 |
commit | ecc2c726502448076295254714c0bfa8c0074f25 (patch) | |
tree | 6a9434c540f7b5ea7bca326df1a420e4a0a99cc4 /indra/newview/llappviewer.cpp | |
parent | d2f9e34598621f1dabad15025417efd6b81dddf0 (diff) | |
parent | ac103403160e87bb6b40ac3e032d077a3381da8e (diff) |
Merge latest viewer-hotfix, approximately equal to Viewer 2.0 final
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r-- | indra/newview/llappviewer.cpp | 50 |
1 files changed, 14 insertions, 36 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index e6206ba0d2..02902bc8a5 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -304,8 +304,7 @@ static std::string gLaunchFileOnQuit; // Used on Win32 for other apps to identify our window (eg, win_setup) const char* const VIEWER_WINDOW_CLASSNAME = "Second Life"; -static const S32 FIRST_RUN_WINDOW_WIDTH = 1024; -static const S32 FIRST_RUN_WINDOW_HRIGHT = 768; + //---------------------------------------------------------------------------- // List of entries from strings.xml to always replace @@ -2195,10 +2194,12 @@ bool LLAppViewer::initConfiguration() // Display splash screen. Must be after above check for previous // crash as this dialog is always frontmost. - std::ostringstream splash_msg; - splash_msg << "Loading " << LLTrans::getString("SECOND_LIFE") << "..."; + std::string splash_msg; + LLStringUtil::format_map_t args; + args["[APP_NAME]"] = LLTrans::getString("SECOND_LIFE"); + splash_msg = LLTrans::getString("StartupLoading", args); LLSplashScreen::show(); - LLSplashScreen::update(splash_msg.str()); + LLSplashScreen::update(splash_msg); //LLVolumeMgr::initClass(); LLVolumeMgr* volume_manager = new LLVolumeMgr(); @@ -2366,35 +2367,12 @@ bool LLAppViewer::initWindow() // store setting in a global for easy access and modification gNoRender = gSavedSettings.getBOOL("DisableRendering"); - S32 window_x = gSavedSettings.getS32("WindowX"); - S32 window_y = gSavedSettings.getS32("WindowY"); - S32 window_width = gSavedSettings.getS32("WindowWidth"); - S32 window_height = gSavedSettings.getS32("WindowHeight"); - - bool show_maximized = gSavedSettings.getBOOL("WindowMaximized"); - - bool first_run = gSavedSettings.getBOOL("FirstLoginThisInstall"); - - if (first_run)//for first login - { - window_width = FIRST_RUN_WINDOW_WIDTH;//yep hardcoded - window_height = FIRST_RUN_WINDOW_HRIGHT; - - //if screen resolution is lower then 1024*768 then show maximized - LLDisplayInfo display_info; - if(display_info.getDisplayWidth() <= FIRST_RUN_WINDOW_WIDTH - || display_info.getDisplayHeight()<=FIRST_RUN_WINDOW_HRIGHT) - { - show_maximized = true; - } - } - // always start windowed BOOL ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth"); gViewerWindow = new LLViewerWindow(gWindowTitle, VIEWER_WINDOW_CLASSNAME, - window_x, window_y, - window_width, window_height, + gSavedSettings.getS32("WindowX"), gSavedSettings.getS32("WindowY"), + gSavedSettings.getS32("WindowWidth"), gSavedSettings.getS32("WindowHeight"), FALSE, ignorePixelDepth); LLNotificationsUI::LLNotificationManager::getInstance(); @@ -2405,7 +2383,7 @@ bool LLAppViewer::initWindow() gViewerWindow->toggleFullscreen(FALSE); } - if (show_maximized) + if (gSavedSettings.getBOOL("WindowMaximized")) { gViewerWindow->mWindow->maximize(); gViewerWindow->getWindow()->setNativeAspectRatio(gSavedSettings.getF32("FullScreenAspectRatio")); @@ -3062,11 +3040,11 @@ bool LLAppViewer::initCache() if (mPurgeCache) { - LLSplashScreen::update("Clearing cache..."); + LLSplashScreen::update(LLTrans::getString("StartupClearingCache")); purgeCache(); } - LLSplashScreen::update("Initializing Texture Cache..."); + LLSplashScreen::update(LLTrans::getString("StartupInitializingTextureCache")); // Init the texture cache // Allocate 80% of the cache size for textures @@ -3079,7 +3057,7 @@ bool LLAppViewer::initCache() S64 extra = LLAppViewer::getTextureCache()->initCache(LL_PATH_CACHE, texture_cache_size, read_only); texture_cache_size -= extra; - LLSplashScreen::update("Initializing VFS..."); + LLSplashScreen::update(LLTrans::getString("StartupInitializingVFS")); // Init the VFS S64 vfs_size = cache_size - texture_cache_size; @@ -3839,7 +3817,7 @@ void LLAppViewer::idleShutdown() S32 finished_uploads = total_uploads - pending_uploads; F32 percent = 100.f * finished_uploads / total_uploads; gViewerWindow->setProgressPercent(percent); - gViewerWindow->setProgressString("Saving your settings..."); + gViewerWindow->setProgressString(LLTrans::getString("SavingSettings")); return; } @@ -3851,7 +3829,7 @@ void LLAppViewer::idleShutdown() // Wait for a LogoutReply message gViewerWindow->setShowProgress(TRUE); gViewerWindow->setProgressPercent(100.f); - gViewerWindow->setProgressString("Logging out..."); + gViewerWindow->setProgressString(LLTrans::getString("LoggingOut")); return; } |