summaryrefslogtreecommitdiff
path: root/indra/newview/llscreenchannel.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-05-01 15:52:13 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-05-01 15:52:13 +0100
commitf13b30848bb224695e9708ab61742c6d86d29935 (patch)
tree01a10ce4ea660b719cbca9544917b46af7628692 /indra/newview/llscreenchannel.cpp
parent5ab2d0755578b4129b532f67a78d780be039fed0 (diff)
parent0cbdad70611201a94b9550598e61067faa1fac6b (diff)
merge from viewer-trunk
Diffstat (limited to 'indra/newview/llscreenchannel.cpp')
-rw-r--r--indra/newview/llscreenchannel.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index af440a3689..de1da248c1 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -706,6 +706,31 @@ void LLScreenChannel::hideToast(const LLUUID& notification_id)
}
}
+void LLScreenChannel::closeHiddenToasts(const Matcher& matcher)
+{
+ // since we can't guarantee that close toast operation doesn't change mToastList
+ // we collect matched toasts that should be closed into separate list
+ std::list<ToastElem> toasts;
+ for (std::vector<ToastElem>::iterator it = mToastList.begin(); it
+ != mToastList.end(); it++)
+ {
+ LLToast * toast = it->toast;
+ // add to list valid toast that match to provided matcher criteria
+ if (toast != NULL && !toast->isDead() && toast->getNotification() != NULL
+ && !toast->getVisible() && matcher.matches(toast->getNotification()))
+ {
+ toasts.push_back(*it);
+ }
+ }
+
+ // close collected toasts
+ for (std::list<ToastElem>::iterator it = toasts.begin(); it
+ != toasts.end(); it++)
+ {
+ it->toast->closeFloater();
+ }
+}
+
//--------------------------------------------------------------------------
void LLScreenChannel::removeToastsFromChannel()
{