diff options
author | Steve Bennetts <steve@lindenlab.com> | 2009-11-16 09:03:05 -0800 |
---|---|---|
committer | Steve Bennetts <steve@lindenlab.com> | 2009-11-16 09:03:05 -0800 |
commit | be666bc14f7252b5cfa0b9c2e34f170f5e24c4d3 (patch) | |
tree | 282683cfddf5c624a72cd3f21cd66f18818cba77 /indra/newview/llnotificationgrouphandler.cpp | |
parent | 211529eee9a4cbb36961af75e94af73da920d08d (diff) | |
parent | aba8b04cfc6763ee565a5ae9929e8be044272b08 (diff) |
merge from product-engine
Diffstat (limited to 'indra/newview/llnotificationgrouphandler.cpp')
-rw-r--r-- | indra/newview/llnotificationgrouphandler.cpp | 14 |
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); + } +} +//-------------------------------------------------------------------------- |