From d75723439767ad62f2f919e29b713eca137f04d5 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Wed, 10 Oct 2018 00:04:13 +0300 Subject: SL-9800 Changed llTextBox to have selectable "message" text --- indra/newview/lltoastscripttextbox.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/lltoastscripttextbox.cpp') diff --git a/indra/newview/lltoastscripttextbox.cpp b/indra/newview/lltoastscripttextbox.cpp index 776ae2ece9..518c6c0ee4 100644 --- a/indra/newview/lltoastscripttextbox.cpp +++ b/indra/newview/lltoastscripttextbox.cpp @@ -28,6 +28,7 @@ #include "lltoastscripttextbox.h" +#include "lldbstrings.h" #include "lllslconstants.h" #include "llnotifications.h" #include "llstyle.h" @@ -35,13 +36,16 @@ #include "llviewertexteditor.h" const S32 LLToastScriptTextbox::DEFAULT_MESSAGE_MAX_LINE_COUNT= 14; +// *TODO: magic numbers - copied from lltoastnotifypanel.cpp(50) which was copied from llnotify.cpp(250) +const S32 MAX_LENGTH = 512 + 20 + DB_FIRST_NAME_BUF_SIZE + DB_LAST_NAME_BUF_SIZE + DB_INV_ITEM_NAME_BUF_SIZE; LLToastScriptTextbox::LLToastScriptTextbox(const LLNotificationPtr& notification) : LLToastPanel(notification) { buildFromFile( "panel_notify_textbox.xml"); - mInfoText = getChild("text_editor_box"); + mInfoText = getChild("text_editor_box"); + mInfoText->setMaxTextLength(MAX_LENGTH); mInfoText->setValue(notification->getMessage()); getChild("ignore_btn")->setClickedCallback(boost::bind(&LLToastScriptTextbox::onClickIgnore, this)); -- cgit v1.2.3