summaryrefslogtreecommitdiff
path: root/indra/llui/llnotifications.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llnotifications.cpp')
-rw-r--r--indra/llui/llnotifications.cpp27
1 files changed, 19 insertions, 8 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 2a7ca4c321..67b3c5cfce 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -395,8 +395,8 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par
mSoundEffect = LLUUID(LLUI::sSettingGroups["config"]->getString(p.sound));
}
- for(LLInitParam::ParamIterator<LLNotificationTemplate::UniquenessContext>::const_iterator it = p.unique.contexts().begin(),
- end_it = p.unique.contexts().end();
+ for(LLInitParam::ParamIterator<LLNotificationTemplate::UniquenessContext>::const_iterator it = p.unique.contexts.begin(),
+ end_it = p.unique.contexts.end();
it != end_it;
++it)
{
@@ -600,7 +600,7 @@ void LLNotification::respond(const LLSD& response)
{
mResponder->handleRespond(asLLSD(), response);
}
- else
+ else if (!mResponseFunctorName.empty())
{
// look up the functor
LLNotificationFunctorRegistry::ResponseFunctor functor =
@@ -608,6 +608,11 @@ void LLNotification::respond(const LLSD& response)
// and then call it
functor(asLLSD(), response);
}
+ else
+ {
+ // no registered responder
+ return;
+ }
if (mTemporaryResponder && !isReusable())
{
@@ -628,6 +633,12 @@ void LLNotification::respond(const LLSD& response)
update();
}
+void LLNotification::respondWithDefault()
+{
+ respond(getResponseTemplate(WITH_DEFAULT_BUTTON));
+}
+
+
const std::string& LLNotification::getName() const
{
return mTemplatep->mName;
@@ -1302,8 +1313,8 @@ void replaceFormText(LLNotificationForm::Params& form, const std::string& patter
{
form.ignore.text = replace;
}
- for (LLInitParam::ParamIterator<LLNotificationForm::FormElement>::iterator it = form.form_elements.elements().begin(),
- end_it = form.form_elements.elements().end();
+ for (LLInitParam::ParamIterator<LLNotificationForm::FormElement>::iterator it = form.form_elements.elements.begin(),
+ end_it = form.form_elements.elements.end();
it != end_it;
++it)
{
@@ -1334,7 +1345,7 @@ bool LLNotifications::loadTemplates()
mTemplates.clear();
- for(LLInitParam::ParamIterator<LLNotificationTemplate::GlobalString>::const_iterator it = params.strings().begin(), end_it = params.strings().end();
+ for(LLInitParam::ParamIterator<LLNotificationTemplate::GlobalString>::const_iterator it = params.strings.begin(), end_it = params.strings.end();
it != end_it;
++it)
{
@@ -1343,14 +1354,14 @@ bool LLNotifications::loadTemplates()
std::map<std::string, LLNotificationForm::Params> form_templates;
- for(LLInitParam::ParamIterator<LLNotificationTemplate::Template>::const_iterator it = params.templates().begin(), end_it = params.templates().end();
+ for(LLInitParam::ParamIterator<LLNotificationTemplate::Template>::const_iterator it = params.templates.begin(), end_it = params.templates.end();
it != end_it;
++it)
{
form_templates[it->name] = it->form;
}
- for(LLInitParam::ParamIterator<LLNotificationTemplate::Params>::iterator it = params.notifications().begin(), end_it = params.notifications().end();
+ for(LLInitParam::ParamIterator<LLNotificationTemplate::Params>::iterator it = params.notifications.begin(), end_it = params.notifications.end();
it != end_it;
++it)
{