From c0ba3e95f3f9299bec4518ba80fdf88d60e03998 Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Mon, 31 Dec 2012 19:06:23 -0500 Subject: [PATCH] Ability to change default behavior of Chats being torn off so that all chats appear minimized upon opening, as well, regardless of conditions. Adds debug setting OtherChatsTornOffAndMinimized Not added to ui xml because the default behavior is likely fine. --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/llimview.cpp | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 2d228ce3e..423207776 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -760,6 +760,17 @@ Found in Advanced->Rendering->Info Displays Value 0 + OtherChatsTornOffAndMinimized + + Comment + When this and OtherChatsTornOff are true, new chats open torn off and minimized. + Persist + 1 + Type + Boolean + Value + 0 + MarketImporterUpdateFreq Comment diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp index 69e2c78d3..92f5cd320 100644 --- a/indra/newview/llimview.cpp +++ b/indra/newview/llimview.cpp @@ -1176,11 +1176,16 @@ LLFloaterIMPanel* LLIMMgr::createFloater( gFloaterView->addChild(floater); // reparent to floater view LLFloater* focused_floater = gFloaterView->getFocusedFloater(); // obtain the focused floater floater->open(); // make the new chat floater appear + static LLCachedControl minimize("OtherChatsTornOffAndMinimized"); if (focused_floater != NULL) // there was a focused floater { floater->setMinimized(true); // so minimize this one, for now focused_floater->setFocus(true); // and work around focus being removed by focusing on the last } + else if (minimize) + { + floater->setMinimized(true); + } } mFloaters.insert(floater->getHandle()); return floater;