diff options
Diffstat (limited to 'indra/newview/llnotificationscripthandler.cpp')
-rw-r--r-- | indra/newview/llnotificationscripthandler.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp index 2cac86cc0b..f01f2e4441 100644 --- a/indra/newview/llnotificationscripthandler.cpp +++ b/indra/newview/llnotificationscripthandler.cpp @@ -42,6 +42,9 @@ using namespace LLNotificationsUI; +static const std::string SCRIPT_DIALOG ("ScriptDialog"); +static const std::string SCRIPT_DIALOG_GROUP ("ScriptDialogGroup"); + //-------------------------------------------------------------------------- LLScriptHandler::LLScriptHandler(e_notification_type type, const LLSD& id) { @@ -91,7 +94,7 @@ bool LLScriptHandler::processNotification(const LLSD& notify) if(notify["sigtype"].asString() == "add" || notify["sigtype"].asString() == "change") { - if("ScriptDialog" == notification->getName() || "ScriptDialogGroup" == notification->getName()) + if(SCRIPT_DIALOG == notification->getName() || SCRIPT_DIALOG_GROUP == notification->getName()) { LLScriptFloaterManager::getInstance()->onAddNotification(notification->getID()); } @@ -117,11 +120,14 @@ bool LLScriptHandler::processNotification(const LLSD& notify) } else if (notify["sigtype"].asString() == "delete") { - mChannel->killToastByNotificationID(notification->getID()); - if("ScriptDialog" == notification->getName()) + if(SCRIPT_DIALOG == notification->getName() || SCRIPT_DIALOG_GROUP == notification->getName()) { LLScriptFloaterManager::getInstance()->onRemoveNotification(notification->getID()); } + else + { + mChannel->killToastByNotificationID(notification->getID()); + } } return true; } @@ -139,8 +145,8 @@ void LLScriptHandler::onDeleteToast(LLToast* toast) LLNotificationPtr notification = LLNotifications::getInstance()->find(toast->getNotificationID()); - if( notification && ("ScriptDialog" == notification->getName() - || "ScriptDialogGroup" == notification->getName()) ) + if( notification && + (SCRIPT_DIALOG == notification->getName() || SCRIPT_DIALOG_GROUP == notification->getName()) ) { LLScriptFloaterManager::getInstance()->onRemoveNotification(notification->getID()); } |