From c3e63e7ab734ed5bfbaf47c0571fb64c725a230d Mon Sep 17 00:00:00 2001 From: Lirusaito Date: Mon, 25 Feb 2013 17:39:53 -0500 Subject: [PATCH] handleLocalChatBar visibility whenever ShowLocalChatFloaterBar changes value --- indra/newview/app_settings/settings.xml | 2 +- indra/newview/llfloaterchatterbox.cpp | 14 ++++++++++++-- .../xui/en-us/panel_preferences_ascent_chat.xml | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 35a57e811..96c77bbcc 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -762,7 +762,7 @@ Found in Advanced->Rendering->Info Displays ShowLocalChatFloaterBar Comment - Whether or not local chat should have an input bar when undocked, requires docking and undocking if already undocked. + Whether or not local chat should have an input bar when undocked. Persist 1 Type diff --git a/indra/newview/llfloaterchatterbox.cpp b/indra/newview/llfloaterchatterbox.cpp index 178ddc4c3..e4bebeec3 100644 --- a/indra/newview/llfloaterchatterbox.cpp +++ b/indra/newview/llfloaterchatterbox.cpp @@ -44,6 +44,15 @@ #include "llimview.h" #include "llimpanel.h" #include "llstring.h" + +namespace +{ + void handleLocalChatBar(LLFloaterChat* floater_chat, bool show_bar) + { + floater_chat->childSetVisible("chat_layout_panel", show_bar || !gSavedSettings.getBOOL("ChatHistoryTornOff")); + } +} + // // LLFloaterMyFriends // @@ -119,9 +128,9 @@ LLFloaterChatterBox::LLFloaterChatterBox(const LLSD& seed) : addFloater(LLFloaterMyFriends::getInstance(0), TRUE); } + LLFloaterChat* floater_chat = LLFloaterChat::getInstance(); if (gSavedSettings.getBOOL("ChatHistoryTornOff")) { - LLFloaterChat* floater_chat = LLFloaterChat::getInstance(); // add then remove to set up relationship for re-attach addFloater(floater_chat, FALSE); removeFloater(floater_chat); @@ -130,8 +139,9 @@ LLFloaterChatterBox::LLFloaterChatterBox(const LLSD& seed) : } else { - addFloater(LLFloaterChat::getInstance(LLSD()), FALSE); + addFloater(floater_chat, FALSE); } + gSavedSettings.getControl("ShowLocalChatFloaterBar")->getSignal()->connect(boost::bind(handleLocalChatBar, floater_chat, _2)); mTabContainer->lockTabs(); } diff --git a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_chat.xml b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_chat.xml index d51e91454..475ce06fa 100644 --- a/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_chat.xml +++ b/indra/newview/skins/default/xui/en-us/panel_preferences_ascent_chat.xml @@ -70,7 +70,7 @@ - +