diff options
| author | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-23 15:50:49 +0200 |
|---|---|---|
| committer | Dmitry Zaporozhan <dzaporozhan@productengine.com> | 2009-11-23 15:50:49 +0200 |
| commit | 9f0dbcf4c0c6c8621c377fd7f9e417aa76acd836 (patch) | |
| tree | d6ea62b73e0b74bc3e6babb9596f25b8d46029a0 /indra/newview/llnotificationscripthandler.cpp | |
| parent | d0c1593d85cd26ad822d31e21df7a1864d66541c (diff) | |
Update for task EXT-2081 - Object IM chiclets art needs to be hooked up to LLDialog chiclets.
Cleaned code, added comments.
--HG--
branch : product-engine
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()); } |
