Merge branch 'master' of https://github.com/AlericInglewood/SingularityViewer.git into CT3Merge
This commit is contained in:
@@ -7046,40 +7046,35 @@ void process_script_dialog(LLMessageSystem* msg, void**)
|
||||
}
|
||||
else
|
||||
{
|
||||
for (i = 1; i < button_count; i++)
|
||||
{
|
||||
std::string tdesc;
|
||||
msg->getString("Buttons", "ButtonLabel", tdesc, i);
|
||||
form.addElement("button", std::string(tdesc));
|
||||
}
|
||||
for (i = 1; i < button_count; i++)
|
||||
{
|
||||
std::string tdesc;
|
||||
msg->getString("Buttons", "ButtonLabel", tdesc, i);
|
||||
form.addElement("button", std::string(tdesc));
|
||||
}
|
||||
}
|
||||
|
||||
LLSD args;
|
||||
args["TITLE"] = object_name;
|
||||
args["MESSAGE"] = message;
|
||||
// <edit>
|
||||
args["CHANNEL"] = chat_channel;
|
||||
// </edit>
|
||||
LLNotificationPtr notification;
|
||||
if (!first_name.empty())
|
||||
bool const is_group = first_name.empty();
|
||||
char const* name = (is_group && !is_text_box) ? "GROUPNAME" : "NAME";
|
||||
args[name] = is_group ? last_name : LLCacheName::buildFullName(first_name, last_name);
|
||||
if (is_text_box)
|
||||
{
|
||||
args["DEFAULT"] = default_text;
|
||||
payload["textbox"] = "true";
|
||||
LLNotificationsUtil::add("ScriptTextBoxDialog", args, payload, callback_script_dialog);
|
||||
}
|
||||
else if (!first_name.empty())
|
||||
{
|
||||
args["NAME"] = LLCacheName::buildFullName(first_name, last_name);
|
||||
|
||||
if (is_text_box)
|
||||
{
|
||||
args["DEFAULT"] = default_text;
|
||||
payload["textbox"] = "true";
|
||||
LLNotificationsUtil::add("ScriptTextBoxDialog", args, payload, callback_script_dialog);
|
||||
}
|
||||
else
|
||||
{
|
||||
notification = LLNotifications::instance().add(
|
||||
LLNotification::Params("ScriptDialog").substitutions(args).payload(payload).form_elements(form.asLLSD()));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
args["GROUPNAME"] = last_name;
|
||||
notification = LLNotifications::instance().add(
|
||||
LLNotification::Params("ScriptDialogGroup").substitutions(args).payload(payload).form_elements(form.asLLSD()));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user