summaryrefslogtreecommitdiff
path: root/indra/newview/llnotificationgrouphandler.cpp
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2009-11-19 13:19:16 -0500
committerLoren Shih <seraph@lindenlab.com>2009-11-19 13:19:16 -0500
commit6cea252986ef6d33f2e37333a286362b8e0272c5 (patch)
treeec0e4d56a9dc2d8a97cc9bce4744b097f4b7efe4 /indra/newview/llnotificationgrouphandler.cpp
parent2b0a997b13de15c7aae009b52d7353c97e1781f3 (diff)
parent815f336a157cc33233633deed66634195d3dc552 (diff)
merge
--HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/llnotificationgrouphandler.cpp')
-rw-r--r--indra/newview/llnotificationgrouphandler.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llnotificationgrouphandler.cpp b/indra/newview/llnotificationgrouphandler.cpp
index fc6fb25644..26730e1f10 100644
--- a/indra/newview/llnotificationgrouphandler.cpp
+++ b/indra/newview/llnotificationgrouphandler.cpp
@@ -37,6 +37,7 @@
#include "llgroupactions.h"
#include "llviewercontrol.h"
#include "llviewerwindow.h"
+#include "llnotificationmanager.h"
using namespace LLNotificationsUI;
@@ -47,6 +48,9 @@ LLGroupHandler::LLGroupHandler(e_notification_type type, const LLSD& id)
// Getting a Channel for our notifications
mChannel = LLChannelManager::getInstance()->createNotificationChannel();
+ LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel);
+ if(channel)
+ channel->setOnRejectToastCallback(boost::bind(&LLGroupHandler::onRejectToast, this, _1));
}
//--------------------------------------------------------------------------
@@ -118,5 +122,15 @@ void LLGroupHandler::onDeleteToast(LLToast* toast)
}
//--------------------------------------------------------------------------
+void LLGroupHandler::onRejectToast(LLUUID& id)
+{
+ LLNotificationPtr notification = LLNotifications::instance().find(id);
+
+ if (notification && LLNotificationManager::getInstance()->getHandlerForNotification(notification->getType()) == this)
+ {
+ LLNotifications::instance().cancel(notification);
+ }
+}
+//--------------------------------------------------------------------------