From 35eddbc20b07740903550783b645d122186b28e2 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Wed, 7 Apr 2010 01:09:14 -0700 Subject: Ported disable login/tp screen options from Emerald (in Preferences > Advanced) --- linden/indra/newview/app_settings/settings.xml | 22 +++++++++++++++ linden/indra/newview/llappviewer.cpp | 4 +-- linden/indra/newview/llprefsadvanced.cpp | 6 +++++ linden/indra/newview/llstartup.cpp | 31 ++++++++++++++++++---- linden/indra/newview/llviewerdisplay.cpp | 6 ++--- .../xui/en-us/panel_preferences_advanced.xml | 9 +++++++ 6 files changed, 68 insertions(+), 10 deletions(-) diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index d300b87..c950973 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -15,6 +15,28 @@ Value 1 + DisableLoginLogoutScreens + + Comment + Disable login/logout screen progress bar screens + Persist + 1 + Type + Boolean + Value + 0 + + DisableTeleportScreens + + Comment + Disable teleport screens + Persist + 1 + Type + Boolean + Value + 0 + ShowStatusBarInMouselook Comment diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index e4cd3af..9b7eadf 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp @@ -3673,7 +3673,7 @@ void LLAppViewer::idleShutdown() static S32 total_uploads = 0; // Sometimes total upload count can change during logout. total_uploads = llmax(total_uploads, pending_uploads); - gViewerWindow->setShowProgress(TRUE); + gViewerWindow->setShowProgress(!gSavedSettings.getBOOL("DisableLoginLogoutScreens")); S32 finished_uploads = total_uploads - pending_uploads; F32 percent = 100.f * finished_uploads / total_uploads; gViewerWindow->setProgressPercent(percent); @@ -3687,7 +3687,7 @@ void LLAppViewer::idleShutdown() sendLogoutRequest(); // Wait for a LogoutReply message - gViewerWindow->setShowProgress(TRUE); + gViewerWindow->setShowProgress(!gSavedSettings.getBOOL("DisableLoginLogoutScreens")); gViewerWindow->setProgressPercent(100.f); gViewerWindow->setProgressString("Logging out..."); return; diff --git a/linden/indra/newview/llprefsadvanced.cpp b/linden/indra/newview/llprefsadvanced.cpp index c25f04b..efb8a27 100644 --- a/linden/indra/newview/llprefsadvanced.cpp +++ b/linden/indra/newview/llprefsadvanced.cpp @@ -31,6 +31,7 @@ #include "llviewerprecompiledheaders.h" #include "llprefsadvanced.h" +#include "llviewercontrol.h" #include "lluictrlfactory.h" @@ -46,11 +47,16 @@ LLPrefsAdvanced::~LLPrefsAdvanced() BOOL LLPrefsAdvanced::postBuild() { + childSetValue("disable_log_screen_check", gSavedSettings.getBOOL("DisableLoginLogoutScreens")); + childSetValue("disable_tp_screen_check", gSavedSettings.getBOOL("DisableTeleportScreens")); + return TRUE; } void LLPrefsAdvanced::apply() { + gSavedSettings.setBOOL("DisableLoginLogoutScreens", childGetValue("disable_log_screen_check")); + gSavedSettings.setBOOL("DisableTeleportScreens", childGetValue("disable_tp_screen_check")); } void LLPrefsAdvanced::cancel() diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 11bd87b..449e712 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -1008,7 +1008,7 @@ bool idle_startup() } // Display the startup progress bar. - gViewerWindow->setShowProgress(TRUE); + gViewerWindow->setShowProgress(!gSavedSettings.getBOOL("DisableLoginLogoutScreens")); gViewerWindow->setProgressCancelButtonVisible(TRUE, std::string("Quit")); // *TODO: Translate // Poke the VFS, which could potentially block for a while if @@ -2910,13 +2910,34 @@ bool first_run_dialog_callback(const LLSD& notification, const LLSD& response) } - +std::string last_d; void set_startup_status(const F32 frac, const std::string& string, const std::string& msg) { - gViewerWindow->setProgressPercent(frac*100); - gViewerWindow->setProgressString(string); + if(gSavedSettings.getBOOL("DisableLoginLogoutScreens")) + { + std::string new_d = string; + if(new_d != last_d) + { + last_d = new_d; + LLChat chat; + chat.mText = new_d; + chat.mSourceType = (EChatSourceType)(CHAT_SOURCE_OBJECT+1); + LLFloaterChat::addChat(chat); + if(new_d == LLTrans::getString("LoginWaitingForRegionHandshake")) + { + chat.mText = "MOTD: "+msg; + chat.mSourceType = (EChatSourceType)(CHAT_SOURCE_OBJECT+1); + LLFloaterChat::addChat(chat); + } + } + } + else + { + gViewerWindow->setProgressPercent(frac*100); + gViewerWindow->setProgressString(string); - gViewerWindow->setProgressMessage(msg); + gViewerWindow->setProgressMessage(msg); + } } bool login_alert_status(const LLSD& notification, const LLSD& response) diff --git a/linden/indra/newview/llviewerdisplay.cpp b/linden/indra/newview/llviewerdisplay.cpp index 28d048b..6f7de25 100644 --- a/linden/indra/newview/llviewerdisplay.cpp +++ b/linden/indra/newview/llviewerdisplay.cpp @@ -348,7 +348,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) // Transition to REQUESTED. Viewer has sent some kind // of TeleportRequest to the source simulator gTeleportDisplayTimer.reset(); - gViewerWindow->setShowProgress(TRUE); + if(!gSavedSettings.getBOOL("DisableTeleportScreens"))gViewerWindow->setShowProgress(TRUE); gViewerWindow->setProgressPercent(0); gAgent.setTeleportState( LLAgent::TELEPORT_REQUESTED ); gAgent.setTeleportMessage( @@ -376,14 +376,14 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) gAgent.setTeleportMessage( LLAgent::sTeleportProgressMessages["arriving"]); gImageList.mForceResetTextureStats = TRUE; - gAgent.resetView(TRUE, TRUE); + if(!gSavedSettings.getBOOL("DisableTeleportScreens"))gAgent.resetView(TRUE, TRUE); break; case LLAgent::TELEPORT_ARRIVING: // Make the user wait while content "pre-caches" { F32 arrival_fraction = (gTeleportArrivalTimer.getElapsedTimeF32() / TELEPORT_ARRIVAL_DELAY); - if( arrival_fraction > 1.f ) + if( arrival_fraction > 1.f || gSavedSettings.getBOOL("DisableTeleportScreens")) { arrival_fraction = 1.f; LLFirstUse::useTeleport(); diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml index 31d1ffd..ba02942 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_advanced.xml @@ -2,4 +2,13 @@ + + -- cgit v1.1