From 48fd4c8d14172ab9780d88bf204d1e4e56f2004e Mon Sep 17 00:00:00 2001 From: Eugene Mutavchi Date: Fri, 5 Mar 2010 21:36:41 +0200 Subject: Working on major bug EXT-4820([NUX] Viewer dimensions on first-run) - moved LLDisplayInfo to llwindow, implemented getting the width/height of screen for mac os and linux. --HG-- branch : product-engine --- indra/newview/llappviewer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6d4c90c2b9..8b3f3aa28e 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -305,7 +305,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; +static const S32 FIRST_RUN_WINDOW_HIGHT = 768; //---------------------------------------------------------------------------- // List of entries from strings.xml to always replace @@ -2375,12 +2375,12 @@ bool LLAppViewer::initWindow() if (first_run)//for first login { window_width = FIRST_RUN_WINDOW_WIDTH;//yep hardcoded - window_height = FIRST_RUN_WINDOW_HRIGHT; + window_height = FIRST_RUN_WINDOW_HIGHT; //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) + || display_info.getDisplayHeight()<=FIRST_RUN_WINDOW_HIGHT) { show_maximized = true; } -- cgit v1.2.3 From 04e692b3f1fbd98bc9fabc76e258c89b95458468 Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Tue, 16 Mar 2010 14:45:12 +0200 Subject: Fixed bug EXT-6007 ([STRING IN EN] - While loading Second Life several messages need to be localized). Reviewed by Richard: https://codereview.productengine.com/secondlife/r/31/ --HG-- branch : product-engine --- indra/newview/llappviewer.cpp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index bdfe0d9142..5b521457e9 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -2199,10 +2199,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(); @@ -3066,11 +3068,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 @@ -3083,7 +3085,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; @@ -3852,7 +3854,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; } @@ -3864,7 +3866,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; } -- cgit v1.2.3 From ba52dc2fd1d4f7c2947fd7b8bdb2adb617d9376e Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Tue, 16 Mar 2010 17:49:45 +0200 Subject: fixed EXT-4820 [NUX] Viewer dimensions on first-run changed first run window height from 768 to 738 Reviewed by Vadim at https://codereview.productengine.com/secondlife/r/38/ --HG-- branch : product-engine --- indra/newview/llappviewer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 5b521457e9..2384e6c5ba 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -305,7 +305,9 @@ 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_HIGHT = 768; + +//should account for Windows task bar +static const S32 FIRST_RUN_WINDOW_HIGHT = 738; //---------------------------------------------------------------------------- // List of entries from strings.xml to always replace @@ -2386,7 +2388,7 @@ bool LLAppViewer::initWindow() window_width = FIRST_RUN_WINDOW_WIDTH;//yep hardcoded window_height = FIRST_RUN_WINDOW_HIGHT; - //if screen resolution is lower then 1024*768 then show maximized + //if screen resolution is lower then first run width/height then show maximized LLDisplayInfo display_info; if(display_info.getDisplayWidth() <= FIRST_RUN_WINDOW_WIDTH || display_info.getDisplayHeight()<=FIRST_RUN_WINDOW_HIGHT) -- cgit v1.2.3 From ec3443cc858b911f06ef93057644e78085b9abdd Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Thu, 18 Mar 2010 16:27:34 +0200 Subject: Backed out changeset 2624e0d8b6f4 --HG-- branch : product-engine --- indra/newview/llappviewer.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 2384e6c5ba..5b521457e9 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -305,9 +305,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; - -//should account for Windows task bar -static const S32 FIRST_RUN_WINDOW_HIGHT = 738; +static const S32 FIRST_RUN_WINDOW_HIGHT = 768; //---------------------------------------------------------------------------- // List of entries from strings.xml to always replace @@ -2388,7 +2386,7 @@ bool LLAppViewer::initWindow() window_width = FIRST_RUN_WINDOW_WIDTH;//yep hardcoded window_height = FIRST_RUN_WINDOW_HIGHT; - //if screen resolution is lower then first run width/height then show maximized + //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_HIGHT) -- cgit v1.2.3 From c67bc96278ea76372d896fb82fc6f3557feac446 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Thu, 18 Mar 2010 16:31:09 +0200 Subject: Backed out changeset f4c0761897c6 EXT-4820([NUX] Viewer dimensions on first-run) by which "moved LLDisplayInfo to llwindow, implemented getting the width/height of screen for mac os and linux." --HG-- branch : product-engine --- indra/newview/llappviewer.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 8b3f3aa28e..6d4c90c2b9 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -305,7 +305,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_HIGHT = 768; +static const S32 FIRST_RUN_WINDOW_HRIGHT = 768; //---------------------------------------------------------------------------- // List of entries from strings.xml to always replace @@ -2375,12 +2375,12 @@ bool LLAppViewer::initWindow() if (first_run)//for first login { window_width = FIRST_RUN_WINDOW_WIDTH;//yep hardcoded - window_height = FIRST_RUN_WINDOW_HIGHT; + 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_HIGHT) + || display_info.getDisplayHeight()<=FIRST_RUN_WINDOW_HRIGHT) { show_maximized = true; } -- cgit v1.2.3 From 63375642c80c93970eae868c4fa89eefd6e858f7 Mon Sep 17 00:00:00 2001 From: Igor Borovkov Date: Thu, 18 Mar 2010 16:32:55 +0200 Subject: Backed out changeset 0305673fe81e EXT-4820 [NUX] Viewer dimensions on first-run --HG-- branch : product-engine --- indra/newview/llappviewer.cpp | 32 ++++---------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) (limited to 'indra/newview/llappviewer.cpp') diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6d4c90c2b9..948d38befb 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 @@ -2363,35 +2362,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(); @@ -2402,7 +2378,7 @@ bool LLAppViewer::initWindow() gViewerWindow->toggleFullscreen(FALSE); } - if (show_maximized) + if (gSavedSettings.getBOOL("WindowMaximized")) { gViewerWindow->mWindow->maximize(); gViewerWindow->getWindow()->setNativeAspectRatio(gSavedSettings.getF32("FullScreenAspectRatio")); -- cgit v1.2.3