summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2018-10-10 00:04:13 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2018-10-10 00:04:13 +0300
commitd75723439767ad62f2f919e29b713eca137f04d5 (patch)
tree9aeb542d68beb198340e5d685f8853272ac4e43b
parent8b72d66c3b518dcc6325d3cc09bced97a83af891 (diff)
SL-9800 Changed llTextBox to have selectable "message" text
-rwxr-xr-xdoc/contributions.txt2
-rw-r--r--indra/newview/lltoastscripttextbox.cpp6
-rw-r--r--indra/newview/lltoastscripttextbox.h2
-rw-r--r--indra/newview/skins/default/xui/en/panel_notify_textbox.xml59
4 files changed, 41 insertions, 28 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt
index 9f10f1803b..a09b6aff43 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -342,6 +342,8 @@ Celierra Darling
Chantal Harvey
Charles Courtois
Charlie Sazaland
+Chaser Zaks
+ BUG-225599
Cherry Cheevers
ChickyBabes Zuzu
Christopher Organiser
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<LLTextBox>("text_editor_box");
+ mInfoText = getChild<LLTextEditor>("text_editor_box");
+ mInfoText->setMaxTextLength(MAX_LENGTH);
mInfoText->setValue(notification->getMessage());
getChild<LLButton>("ignore_btn")->setClickedCallback(boost::bind(&LLToastScriptTextbox::onClickIgnore, this));
diff --git a/indra/newview/lltoastscripttextbox.h b/indra/newview/lltoastscripttextbox.h
index 7aee02dd00..a539124ef1 100644
--- a/indra/newview/lltoastscripttextbox.h
+++ b/indra/newview/lltoastscripttextbox.h
@@ -48,7 +48,7 @@ public:
private:
- LLTextBox* mInfoText;
+ LLTextEditor* mInfoText;
void onClickSubmit();
void onClickIgnore();
diff --git a/indra/newview/skins/default/xui/en/panel_notify_textbox.xml b/indra/newview/skins/default/xui/en/panel_notify_textbox.xml
index a679ca7f8c..d5003e89eb 100644
--- a/indra/newview/skins/default/xui/en/panel_notify_textbox.xml
+++ b/indra/newview/skins/default/xui/en/panel_notify_textbox.xml
@@ -11,33 +11,40 @@
<string
name="message_max_lines_count"
value="14" />
+ <!-- THIS PANEL CONTROLS TOAST HEIGHT? -->
<panel
- bevel_style="none"
- follows="all"
- height="120"
- label="info_panel"
- layout="topleft"
- left="0"
- name="info_panel"
- top="0"
- width="305">
- <text
- follows="all"
- font="SansSerif"
- height="110"
- layout="topleft"
- left="10"
- mouse_opaque="false"
- name="text_editor_box"
- read_only="true"
- text_color="white"
- text_readonly_color="white"
- top="0"
- width="285"
- wrap="true"
- parse_highlights="true"
- parse_urls="true"/>
- </panel>
+ bevel_style="none"
+ follows="all"
+ height="120"
+ label="info_panel"
+ layout="topleft"
+ left="0"
+ name="info_panel"
+ top="0"
+ width="305">
+ <text_editor
+ bg_readonly_color="Transparent"
+ border_visible="false"
+ embedded_items="false"
+ enabled="true"
+ follows="all"
+ font="SansSerif"
+ height="120"
+ layout="topleft"
+ left="10"
+ mouse_opaque="false"
+ name="text_editor_box"
+ read_only="true"
+ tab_stop="false"
+ text_color="White"
+ text_readonly_color="White"
+ top="0"
+ visible="true"
+ width="285"
+ wrap="true"
+ parse_highlights="true"
+ parse_urls="true"/>
+ </panel>
<panel
bevel_style="none"
follows="left|right|bottom"