summaryrefslogtreecommitdiff
path: root/indra/newview/llscreenchannel.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-01-13 15:15:51 -0800
committerTofu Linden <tofu.linden@lindenlab.com>2010-01-13 15:15:51 -0800
commiteae15689d8af7e2cd37108fda833bcc87f63eb4b (patch)
tree735dc7ac82a5d9f665b8fee5bd191381037f77db /indra/newview/llscreenchannel.cpp
parentc316edda259a3914ceb0c646a543f144c370a39b (diff)
parent6ad8674a8c5a87f438aa5ad6230396a859ba268e (diff)
automated merge PE->viewer2.0
Diffstat (limited to 'indra/newview/llscreenchannel.cpp')
-rw-r--r--indra/newview/llscreenchannel.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/indra/newview/llscreenchannel.cpp b/indra/newview/llscreenchannel.cpp
index da3f1543dd..d0a0dd877f 100644
--- a/indra/newview/llscreenchannel.cpp
+++ b/indra/newview/llscreenchannel.cpp
@@ -357,7 +357,6 @@ void LLScreenChannel::loadStoredToastByNotificationIDToChannel(LLUUID id)
toast->setIsHidden(false);
toast->resetTimer();
mToastList.push_back((*it));
- mStoredToastList.erase(it);
redrawToasts();
}
@@ -779,6 +778,19 @@ void LLScreenChannel::hideToastsFromScreen()
}
//--------------------------------------------------------------------------
+void LLScreenChannel::hideToast(const LLUUID& notification_id)
+{
+ std::vector<ToastElem>::iterator it = find(mToastList.begin(), mToastList.end(), notification_id);
+ if(mToastList.end() != it)
+ {
+ ToastElem te = *it;
+ te.toast->setVisible(FALSE);
+ te.toast->stopTimer();
+ mToastList.erase(it);
+ }
+}
+
+//--------------------------------------------------------------------------
void LLScreenChannel::removeToastsFromChannel()
{
hideToastsFromScreen();
@@ -896,3 +908,13 @@ void LLScreenChannel::updateShowToastsState()
//--------------------------------------------------------------------------
+LLToast* LLScreenChannel::getToastByNotificationID(LLUUID id)
+{
+ std::vector<ToastElem>::iterator it = find(mStoredToastList.begin(),
+ mStoredToastList.end(), id);
+
+ if (it == mStoredToastList.end())
+ return NULL;
+
+ return it->toast;
+}