diff options
author | Oz Linden <oz@lindenlab.com> | 2011-01-05 17:54:12 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-01-05 17:54:12 -0500 |
commit | 1034db639462d95e54e9bf9e4d63500b745bb0a2 (patch) | |
tree | 68b010fb3f9f2c4b67e59187d125090b1c69d72f /indra/llui/llnotifications.cpp | |
parent | 0eb491417e8479516b07cc9237242b60d36d10f5 (diff) | |
parent | eb0b8ab3ea19617a52881191bab21bfedcc5696d (diff) |
merge changes for storm-806
Diffstat (limited to 'indra/llui/llnotifications.cpp')
-rw-r--r-- | indra/llui/llnotifications.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index c347e15792..cd0f0e36b0 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -82,6 +82,7 @@ LLNotificationForm::FormButton::FormButton() LLNotificationForm::FormInput::FormInput() : type("type"), + text("text"), max_length_chars("max_length_chars"), width("width", 0), value("value") @@ -421,7 +422,7 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par it != end_it; ++it) { - mUniqueContext.push_back(it->key); + mUniqueContext.push_back(it->value); } lldebugs << "notification \"" << mName << "\": tag count is " << p.tags.size() << llendl; @@ -792,13 +793,19 @@ bool LLNotification::isEquivalentTo(LLNotificationPtr that) const { const LLSD& these_substitutions = this->getSubstitutions(); const LLSD& those_substitutions = that->getSubstitutions(); + const LLSD& this_payload = this->getPayload(); + const LLSD& that_payload = that->getPayload(); // highlander bit sez there can only be one of these for (std::vector<std::string>::const_iterator it = mTemplatep->mUniqueContext.begin(), end_it = mTemplatep->mUniqueContext.end(); it != end_it; ++it) { - if (these_substitutions.get(*it).asString() != those_substitutions.get(*it).asString()) + // if templates differ in either substitution strings or payload with the given field name + // then they are considered inequivalent + // use of get() avoids converting the LLSD value to a map as the [] operator would + if (these_substitutions.get(*it).asString() != those_substitutions.get(*it).asString() + || this_payload.get(*it).asString() != that_payload.get(*it).asString()) { return false; } |