diff options
Diffstat (limited to 'indra/newview/llnotificationscripthandler.cpp')
-rw-r--r-- | indra/newview/llnotificationscripthandler.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp index 7e9c0d4f4b..5dcd84b400 100644 --- a/indra/newview/llnotificationscripthandler.cpp +++ b/indra/newview/llnotificationscripthandler.cpp @@ -78,33 +78,33 @@ bool LLScriptHandler::processNotification(const LLNotificationPtr& notification) } if (notification->canLogToIM()) - { - LLHandlerUtil::logToIMP2P(notification); - } + { + LLHandlerUtil::logToIMP2P(notification); + } - if(notification->hasFormElements()) + if(notification->hasFormElements() && !notification->canShowToast()) + { + LLScriptFloaterManager::getInstance()->onAddNotification(notification->getID()); + } + else + { + LLToastPanel* notify_box = LLToastPanel::buidPanelFromNotification(notification); + + LLToast::Params p; + p.notif_id = notification->getID(); + p.notification = notification; + p.panel = notify_box; + p.on_delete_toast = boost::bind(&LLScriptHandler::onDeleteToast, this, _1); + + LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); + if(channel) { - LLScriptFloaterManager::getInstance()->onAddNotification(notification->getID()); + channel->addToast(p); } - else - { - LLToastPanel* notify_box = LLToastPanel::buidPanelFromNotification(notification); - - LLToast::Params p; - p.notif_id = notification->getID(); - p.notification = notification; - p.panel = notify_box; - p.on_delete_toast = boost::bind(&LLScriptHandler::onDeleteToast, this, _1); - - LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); - if(channel) - { - channel->addToast(p); - } } return false; - } +} void LLScriptHandler::onDelete( LLNotificationPtr notification ) |