diff options
Diffstat (limited to 'indra/newview/llnotificationalerthandler.cpp')
-rw-r--r-- | indra/newview/llnotificationalerthandler.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/indra/newview/llnotificationalerthandler.cpp b/indra/newview/llnotificationalerthandler.cpp index 06826998bf..7003879dbf 100644 --- a/indra/newview/llnotificationalerthandler.cpp +++ b/indra/newview/llnotificationalerthandler.cpp @@ -67,21 +67,20 @@ LLAlertHandler::~LLAlertHandler() //-------------------------------------------------------------------------- void LLAlertHandler::processNotification(const LLSD& notify) { - LLToast* toast = NULL; - LLNotificationPtr notification = LLNotifications::instance().find(notify["id"].asUUID()); if (notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "load") { LLToastAlertPanel* alert_dialog = new LLToastAlertPanel(notification, mIsModal); - - toast = mChannel->addToast(notification->getID(), (LLToastPanel*)alert_dialog); - if(!toast) - return; - toast->setHideButtonEnabled(false); - toast->setOnToastDestroyCallback((boost::bind(&LLAlertHandler::onToastDestroy, this, toast))); - toast->setCanFade(false); - toast->setModal(mIsModal); + LLToast::Params p; + p.id = notification->getID(); + p.notification = notification; + p.panel = dynamic_cast<LLToastPanel*>(alert_dialog); + p.enable_hide_btn = false; + p.can_fade = false; + p.is_modal = mIsModal; + p.on_toast_destroy = boost::bind(&LLAlertHandler::onToastDestroy, this, _1); + mChannel->addToast(p); } else if (notify["sigtype"].asString() == "change") { |