From 7f746d4c22b25817cbfed47de7f5be61ebd5c806 Mon Sep 17 00:00:00 2001 From: McCabe Maxsted Date: Wed, 7 Apr 2010 02:25:51 -0700 Subject: Use system chat color when DisableLoginLogoutScreens enabled, added logout chat --- linden/indra/newview/llappviewer.cpp | 42 +++++++++++++++++++++++++++++------- linden/indra/newview/llstartup.cpp | 4 ++-- 2 files changed, 36 insertions(+), 10 deletions(-) (limited to 'linden') diff --git a/linden/indra/newview/llappviewer.cpp b/linden/indra/newview/llappviewer.cpp index 9b7eadf..63cc952 100644 --- a/linden/indra/newview/llappviewer.cpp +++ b/linden/indra/newview/llappviewer.cpp @@ -51,6 +51,7 @@ #include "llimpanel.h" #include "llmimetypes.h" #include "llstartup.h" +#include "llfloaterchat.h" #include "llfocusmgr.h" #include "llviewerjoystick.h" #include "llfloaterjoystick.h" @@ -3671,13 +3672,28 @@ void LLAppViewer::idleShutdown() && !logoutRequestSent()) { static S32 total_uploads = 0; + static bool saving_msg = true; // Sometimes total upload count can change during logout. total_uploads = llmax(total_uploads, pending_uploads); - gViewerWindow->setShowProgress(!gSavedSettings.getBOOL("DisableLoginLogoutScreens")); - S32 finished_uploads = total_uploads - pending_uploads; - F32 percent = 100.f * finished_uploads / total_uploads; - gViewerWindow->setProgressPercent(percent); - gViewerWindow->setProgressString("Saving final data..."); + if (gSavedSettings.getBOOL("DisableLoginLogoutScreens")) + { + if (saving_msg) + { + LLChat chat; + chat.mText = "Saving final data..."; + chat.mSourceType = CHAT_SOURCE_SYSTEM; + LLFloaterChat::addChat(chat); + saving_msg = false; + } + } + else + { + gViewerWindow->setShowProgress(TRUE); + S32 finished_uploads = total_uploads - pending_uploads; + F32 percent = 100.f * finished_uploads / total_uploads; + gViewerWindow->setProgressPercent(percent); + gViewerWindow->setProgressString("Saving final data..."); + } return; } @@ -3687,9 +3703,19 @@ void LLAppViewer::idleShutdown() sendLogoutRequest(); // Wait for a LogoutReply message - gViewerWindow->setShowProgress(!gSavedSettings.getBOOL("DisableLoginLogoutScreens")); - gViewerWindow->setProgressPercent(100.f); - gViewerWindow->setProgressString("Logging out..."); + if (gSavedSettings.getBOOL("DisableLoginLogoutScreens")) + { + LLChat chat; + chat.mText = "Logging out..."; + chat.mSourceType = CHAT_SOURCE_SYSTEM; + LLFloaterChat::addChat(chat); + } + else + { + gViewerWindow->setShowProgress(TRUE); + gViewerWindow->setProgressPercent(100.f); + gViewerWindow->setProgressString("Logging out..."); + } return; } diff --git a/linden/indra/newview/llstartup.cpp b/linden/indra/newview/llstartup.cpp index 449e712..20b14af 100644 --- a/linden/indra/newview/llstartup.cpp +++ b/linden/indra/newview/llstartup.cpp @@ -2921,12 +2921,12 @@ void set_startup_status(const F32 frac, const std::string& string, const std::st last_d = new_d; LLChat chat; chat.mText = new_d; - chat.mSourceType = (EChatSourceType)(CHAT_SOURCE_OBJECT+1); + chat.mSourceType = CHAT_SOURCE_SYSTEM; LLFloaterChat::addChat(chat); if(new_d == LLTrans::getString("LoginWaitingForRegionHandshake")) { chat.mText = "MOTD: "+msg; - chat.mSourceType = (EChatSourceType)(CHAT_SOURCE_OBJECT+1); + chat.mSourceType = CHAT_SOURCE_SYSTEM; LLFloaterChat::addChat(chat); } } -- cgit v1.1