summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lltoastscripttextbox.cpp17
-rw-r--r--indra/newview/llviewermessage.cpp6
2 files changed, 14 insertions, 9 deletions
diff --git a/indra/newview/lltoastscripttextbox.cpp b/indra/newview/lltoastscripttextbox.cpp
index 2a0d971a44..91a4831a9c 100644
--- a/indra/newview/lltoastscripttextbox.cpp
+++ b/indra/newview/lltoastscripttextbox.cpp
@@ -164,12 +164,17 @@ void LLToastScriptTextbox::close()
#include "lllslconstants.h"
void LLToastScriptTextbox::onClickOk()
{
- LLSD response = mNotification->getResponseTemplate();
- //response["OH MY GOD WHAT A HACK"] = "woot";
- response[TEXTBOX_MAGIC_TOKEN] = "ffffffffuuuuu";
- mNotification->respond(response);
- close();
- llwarns << response << llendl;
+ LLViewerTextEditor* pMessageText = getChild<LLViewerTextEditor>("message");
+
+ if (pMessageText)
+ {
+ LLSD response = mNotification->getResponseTemplate();
+ //response["OH MY GOD WHAT A HACK"] = "woot";
+ response[TEXTBOX_MAGIC_TOKEN] = pMessageText->getText();
+ mNotification->respond(response);
+ close();
+ llwarns << response << llendl;
+ }
}
/*
void LLToastScriptTextbox::onClickAttachment()
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index b78c7b3d66..f897f5e733 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -6176,9 +6176,9 @@ bool callback_script_dialog(const LLSD& notification, const LLSD& response)
{
LLNotificationForm form(notification["form"]);
//std::string button = "booya";//LLNotification::getSelectedOptionName(response);
- std::string button = response[TEXTBOX_MAGIC_TOKEN].asString().empty() ?
- LLNotification::getSelectedOptionName(response) :
- response[TEXTBOX_MAGIC_TOKEN].asString();
+ std::string button = response.has(TEXTBOX_MAGIC_TOKEN) ?
+ response[TEXTBOX_MAGIC_TOKEN].asString() :
+ LLNotification::getSelectedOptionName(response);
S32 button_idx = LLNotification::getSelectedOption(notification, response);
// Didn't click "Ignore"
if (button_idx != -1)