diff options
author | Alexei Arabadji <aarabadji@productengine.com> | 2010-03-03 19:50:08 +0200 |
---|---|---|
committer | Alexei Arabadji <aarabadji@productengine.com> | 2010-03-03 19:50:08 +0200 |
commit | e84e440adc8aa24fc9c4a4c20aa6b82be71e9e60 (patch) | |
tree | 0128115be7d504c0ef1cbf2b079bd28e0cecdf0c /indra/newview/llnotificationtiphandler.cpp | |
parent | 194a8d45b5d8871458b5f0592050e288727c74bc (diff) | |
parent | 41c3b459f2fa381bdc3e79864ef917f833257274 (diff) |
Automated merge with https://hg.productengine.com/secondlife/viewer-2-0/
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llnotificationtiphandler.cpp')
-rw-r--r-- | indra/newview/llnotificationtiphandler.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/llnotificationtiphandler.cpp b/indra/newview/llnotificationtiphandler.cpp index be76959d07..4e2c5085ed 100644 --- a/indra/newview/llnotificationtiphandler.cpp +++ b/indra/newview/llnotificationtiphandler.cpp @@ -40,6 +40,7 @@ #include "lltoastnotifypanel.h" #include "llviewercontrol.h" #include "llviewerwindow.h" +#include "llnotificationmanager.h" using namespace LLNotificationsUI; @@ -82,6 +83,10 @@ LLTipHandler::LLTipHandler(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(&LLTipHandler::onRejectToast, this, _1)); } //-------------------------------------------------------------------------- @@ -167,6 +172,8 @@ bool LLTipHandler::processNotification(const LLSD& notify) p.is_tip = true; p.can_be_stored = false; + removeExclusiveNotifications(notification); + LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel); if(channel) channel->addToast(p); @@ -185,4 +192,14 @@ void LLTipHandler::onDeleteToast(LLToast* toast) //-------------------------------------------------------------------------- +void LLTipHandler::onRejectToast(const LLUUID& id) +{ + LLNotificationPtr notification = LLNotifications::instance().find(id); + if (notification + && LLNotificationManager::getInstance()->getHandlerForNotification( + notification->getType()) == this) + { + LLNotifications::instance().cancel(notification); + } +} |