From e6a68314a2607d81765f139864f392e45d4b3ca7 Mon Sep 17 00:00:00 2001 From: Cinders Date: Sat, 23 Nov 2013 18:24:13 -0700 Subject: [PATCH 1/2] Option to use single line chat editors rather than expanding ones --- indra/newview/app_settings/settings.xml | 11 +++++++++++ indra/newview/fsfloaterim.cpp | 1 + indra/newview/fsfloaternearbychat.cpp | 1 + 3 files changed, 13 insertions(+) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 8e0916a07c..8c7fd4e736 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -21656,6 +21656,17 @@ Change of this parameter will affect the layout of buttons in notification toast Value 120 + FSUseSingleLineChatEntry + + Comment + Use single line chat entry instead of auto-expanding chat entry + Persist + 1 + Type + Boolean + Value + 0 + diff --git a/indra/newview/fsfloaterim.cpp b/indra/newview/fsfloaterim.cpp index e1c3fba09c..99a17d827a 100644 --- a/indra/newview/fsfloaterim.cpp +++ b/indra/newview/fsfloaterim.cpp @@ -826,6 +826,7 @@ BOOL FSFloaterIM::postBuild() mInputEditor->setCommitOnFocusLost( FALSE ); mInputEditor->setPassDelete(TRUE); mInputEditor->setFont(LLViewerChat::getChatFont()); + mInputEditor->enableSingleLineMode(gSavedSettings.getBOOL("FSUseSingleLineChatEntry")); childSetCommitCallback("chat_editor", onSendMsg, this); diff --git a/indra/newview/fsfloaternearbychat.cpp b/indra/newview/fsfloaternearbychat.cpp index 5c1827456c..b4c71260eb 100644 --- a/indra/newview/fsfloaternearbychat.cpp +++ b/indra/newview/fsfloaternearbychat.cpp @@ -150,6 +150,7 @@ BOOL FSFloaterNearbyChat::postBuild() mInputEditor->setPassDelete(TRUE); mInputEditor->setFont(LLViewerChat::getChatFont()); mInputEditor->setLabel(getString("chatbox_label")); + mInputEditor->enableSingleLineMode(gSavedSettings.getBOOL("FSUseSingleLineChatEntry")); } mChatLayoutPanel = getChild("chat_layout_panel"); mInputPanels = getChild("input_panels"); From d3ef620bf96c47766c7147f92786315b997a7aa3 Mon Sep 17 00:00:00 2001 From: Cinders Date: Sat, 23 Nov 2013 20:36:53 -0700 Subject: [PATCH 2/2] Clean up includes in fsnearbychatcontrol.cpp --- indra/newview/fsnearbychatcontrol.cpp | 72 ++++++--------------------- 1 file changed, 15 insertions(+), 57 deletions(-) diff --git a/indra/newview/fsnearbychatcontrol.cpp b/indra/newview/fsnearbychatcontrol.cpp index 29043d8bb0..4f1d7f0989 100644 --- a/indra/newview/fsnearbychatcontrol.cpp +++ b/indra/newview/fsnearbychatcontrol.cpp @@ -27,72 +27,30 @@ #include "llviewerprecompiledheaders.h" +// llui +#include "lllineeditor.h" +#include "llmenugl.h" +#include "llspinctrl.h" + +// newview #include "fsnearbychatcontrol.h" #include "fsnearbychathub.h" -// [FS communication UI] -//#include "llfloaternearbychat.h" #include "fsfloaternearbychat.h" -// [FS communication UI] -// #include "llviewercontrol.h" -// #include "llviewerwindow.h" -// #include "llrootview.h" -//#include "llchatitemscontainerctrl.h" -// #include "lliconctrl.h" -#include "llspinctrl.h" -// #include "llfloatersidepanelcontainer.h" -// #include "llfocusmgr.h" -// #include "lllogchat.h" -// #include "llresizebar.h" -// #include "llresizehandle.h" -#include "llmenugl.h" -#include "llviewermenu.h"//for gMenuHolder - +#include "llagent.h" // gAgent +#include "llagentcamera.h" // gAgentCamera #include "llfloaterimnearbychathandler.h" -// #include "llnearbychatbar.h" // Remove floating chat bar -// #include "llchannelmanager.h" - -#include "llagent.h" // gAgent -#include "llagentcamera.h" // gAgentCamera -// #include "llchathistory.h" -// #include "llstylemap.h" - -// #include "llavatarnamecache.h" - -// #include "lldraghandle.h" - -// #include "llnearbychatbar.h" // Remove floating chat bar -// #include "llfloaterreg.h" -// #include "lltrans.h" - -// IM -// #include "llbutton.h" -// #include "lllayoutstack.h" - -// #include "llimfloatercontainer.h" -// #include "llimfloater.h" -#include "lllineeditor.h" +#include "llviewermenu.h" //for gMenuHolder //AO - includes for textentry -#include "rlvhandler.h" -#include "llcommandhandler.h" -#include "llkeyboard.h" -#include "llgesturemgr.h" -#include "llmultigesture.h" #include "llautoreplace.h" - -// #include "llconsole.h" -// #include "fscontactsfloater.h" - -// Moved nearby chat functionality here for now -// #include "chatbar_as_cmdline.h" -// #include "llanimationstates.h" // ANIM_AGENT_WHISPER, ANIM_AGENT_TALK, ANIM_AGENT_SHOUT -// #include "llviewerstats.h" -// -// FIRE-3192 - Name Prediction -#include "llworld.h" +#include "llcommandhandler.h" +#include "llgesturemgr.h" +#include "llkeyboard.h" +#include "llmultigesture.h" +#include "llworld.h" // FIRE-3192 - Name Prediction +#include "rlvhandler.h" static const U32 NAME_PREDICTION_MINIMUM_LENGTH = 3; -// static LLDefaultChildRegistry::Register r("fs_nearby_chat_control");