summaryrefslogtreecommitdiff
path: root/indra/llui/llnotifications.cpp
diff options
context:
space:
mode:
authorMonroe Linden <monroe@lindenlab.com>2010-08-27 16:58:33 -0700
committerMonroe Linden <monroe@lindenlab.com>2010-08-27 16:58:33 -0700
commitb62b10dd260c8c01e82e5b206c17a410cedc79f4 (patch)
tree2ea582bb63476566ddabfbd5a0a8f3747eb3fc8e /indra/llui/llnotifications.cpp
parentbef304c0a34bfcd7997bd7799995229ddcc1de31 (diff)
parent51311875b6e23fa9475c42b6d15637aa668729c5 (diff)
Post-convert merge by convert_monolith.py from ./viewer-experience
Diffstat (limited to 'indra/llui/llnotifications.cpp')
-rw-r--r--indra/llui/llnotifications.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp
index 99d540a9de..7dba53e746 100644
--- a/indra/llui/llnotifications.cpp
+++ b/indra/llui/llnotifications.cpp
@@ -1417,6 +1417,30 @@ void LLNotifications::cancel(LLNotificationPtr pNotif)
updateItem(LLSD().with("sigtype", "delete").with("id", pNotif->id()), pNotif);
}
+void LLNotifications::cancelByName(const std::string& name)
+{
+ std::vector<LLNotificationPtr> notifs_to_cancel;
+ for (LLNotificationSet::iterator it=mItems.begin(), end_it = mItems.end();
+ it != end_it;
+ ++it)
+ {
+ LLNotificationPtr pNotif = *it;
+ if (pNotif->getName() == name)
+ {
+ notifs_to_cancel.push_back(pNotif);
+ }
+ }
+
+ for (std::vector<LLNotificationPtr>::iterator it = notifs_to_cancel.begin(), end_it = notifs_to_cancel.end();
+ it != end_it;
+ ++it)
+ {
+ LLNotificationPtr pNotif = *it;
+ pNotif->cancel();
+ updateItem(LLSD().with("sigtype", "delete").with("id", pNotif->id()), pNotif);
+ }
+}
+
void LLNotifications::update(const LLNotificationPtr pNotif)
{
LLNotificationSet::iterator it=mItems.find(pNotif);