From 4dfb0b7b2d76cf288cca34c23218c4769ec76991 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Wed, 29 Sep 2010 19:33:03 +0100 Subject: finally, properly(?) deal with submitting empty text. --- indra/newview/lltoastscripttextbox.cpp | 2 -- indra/newview/llviewermessage.cpp | 7 +++++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/lltoastscripttextbox.cpp b/indra/newview/lltoastscripttextbox.cpp index 23ae4c142d..95f70eda88 100644 --- a/indra/newview/lltoastscripttextbox.cpp +++ b/indra/newview/lltoastscripttextbox.cpp @@ -63,8 +63,6 @@ LLToastScriptTextbox::LLToastScriptTextbox(LLNotificationPtr& notification) llwarns << "LABEL " << notification->getLabel() << llendl; llwarns << "URL " << notification->getURL() << llendl; - //message subject - //const std::string& subject = payload["subject"].asString(); //message body const std::string& message = payload["message"].asString(); diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp index 3a8f76aca1..e284d8d154 100644 --- a/indra/newview/llviewermessage.cpp +++ b/indra/newview/llviewermessage.cpp @@ -6180,9 +6180,12 @@ bool callback_script_dialog(const LLSD& notification, const LLSD& response) std::string rtn_text; S32 button_idx; button_idx = LLNotification::getSelectedOption(notification, response); - if (response[TEXTBOX_MAGIC_TOKEN].isString()) + if (response[TEXTBOX_MAGIC_TOKEN].isDefined()) { - rtn_text = response[TEXTBOX_MAGIC_TOKEN].asString(); + if (response[TEXTBOX_MAGIC_TOKEN].isString()) + rtn_text = response[TEXTBOX_MAGIC_TOKEN].asString(); + else + rtn_text.clear(); // bool marks empty string } else { -- cgit v1.2.3