From 5a0b671cc10cc981016d914d8601efe6cd069c99 Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Mon, 4 Mar 2024 00:14:21 +0100 Subject: [PATCH] FIRE-33735: Option to suppress emoji chooser window from automatically popping up while typing in chat bars --- indra/llui/llemojihelper.cpp | 8 ++++++++ indra/newview/app_settings/settings.xml | 11 +++++++++++ .../default/xui/de/panel_preferences_chat.xml | 2 +- .../default/xui/en/panel_preferences_chat.xml | 14 +++++++++++--- .../default/xui/pl/panel_preferences_chat.xml | 3 ++- 5 files changed, 33 insertions(+), 5 deletions(-) diff --git a/indra/llui/llemojihelper.cpp b/indra/llui/llemojihelper.cpp index 89e6ddf987e..d60b2da8ce8 100644 --- a/indra/llui/llemojihelper.cpp +++ b/indra/llui/llemojihelper.cpp @@ -57,6 +57,14 @@ bool LLEmojiHelper::isActive(const LLUICtrl* ctrl_p) const // static bool LLEmojiHelper::isCursorInEmojiCode(const LLWString& wtext, S32 cursorPos, S32* pShortCodePos) { + // FIRE-33735: Option to suppress emoji chooser window from automatically popping up while typing in chat bars + static LLCachedControl FSSuppressEmojiWindowPopupWhileTyping(*LLUI::getInstance()->mSettingGroups["config"], "FSSuppressEmojiWindowPopupWhileTyping"); + if (FSSuppressEmojiWindowPopupWhileTyping) + { + return false; + } + // + // If the cursor is currently on a colon start the check one character further back S32 shortCodePos = (cursorPos == 0 || L':' != wtext[cursorPos - 1]) ? cursorPos : cursorPos - 1; diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 24a5253e604..a66b4cf24a5 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -26748,5 +26748,16 @@ Change of this parameter will affect the layout of buttons in notification toast Value 1 + FSSuppressEmojiWindowPopupWhileTyping + + Comment + Suppress emoji chooser window from automatically popping up while typing in chat bars. + Persist + 1 + Type + Boolean + Value + 0 + diff --git a/indra/newview/skins/default/xui/de/panel_preferences_chat.xml b/indra/newview/skins/default/xui/de/panel_preferences_chat.xml index 84ffc32a7ff..ab9ab1fe229 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_chat.xml @@ -147,8 +147,8 @@ - + diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index 87029ce1527..258742d0221 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -910,9 +910,9 @@ top_pad="1" height="16" width="400" - control_name="FSShowIMSendButton" - name="FSShowIMSendButton" - label="Show send chat button in chat bar for IM sessions"/> + control_name="FSSuppressEmojiWindowPopupWhileTyping" + name="FSSuppressEmojiWindowPopupWhileTyping" + label="Suppress emoji chooser window from automatically popping up while typing in chat bars"/> + - + +