summaryrefslogtreecommitdiff
path: root/indra/newview/llnotificationscripthandler.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-03-29 23:48:29 -0700
committerRichard Linden <none@none>2012-03-29 23:48:29 -0700
commit2fa1c42aadbe2a29e1bcced9a487c0e5abf0602b (patch)
tree08d9ebd23121654a9cf4e0561b1256de9bc9b608 /indra/newview/llnotificationscripthandler.cpp
parent1ea65f0285d7022ce20ef84d4e35e3c94bcb3fbd (diff)
CHUI-51 WIP notifications routig code cleanup
phase 2, removal of extraneous signaling in favor of llnotificationchannels made notificationchannels work better with overrides and lifetime managed by creator
Diffstat (limited to 'indra/newview/llnotificationscripthandler.cpp')
-rw-r--r--indra/newview/llnotificationscripthandler.cpp19
1 files changed, 3 insertions, 16 deletions
diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp
index 714f14963c..c74c967722 100644
--- a/indra/newview/llnotificationscripthandler.cpp
+++ b/indra/newview/llnotificationscripthandler.cpp
@@ -37,10 +37,6 @@
using namespace LLNotificationsUI;
-static const std::string SCRIPT_DIALOG ("ScriptDialog");
-static const std::string SCRIPT_DIALOG_GROUP ("ScriptDialogGroup");
-static const std::string SCRIPT_LOAD_URL ("LoadWebPage");
-
//--------------------------------------------------------------------------
LLScriptHandler::LLScriptHandler()
: LLSysHandler("Notifications", "notify")
@@ -87,7 +83,7 @@ bool LLScriptHandler::processNotification(const LLNotificationPtr& notification)
LLHandlerUtil::logToIMP2P(notification);
}
- if(SCRIPT_DIALOG == notification->getName() || SCRIPT_DIALOG_GROUP == notification->getName() || SCRIPT_LOAD_URL == notification->getName())
+ if(notification->hasFormElements())
{
LLScriptFloaterManager::getInstance()->onAddNotification(notification->getID());
}
@@ -106,9 +102,6 @@ bool LLScriptHandler::processNotification(const LLNotificationPtr& notification)
{
channel->addToast(p);
}
-
- // send a signal to the counter manager
- mNewNotificationSignal();
}
return false;
@@ -117,7 +110,7 @@ bool LLScriptHandler::processNotification(const LLNotificationPtr& notification)
void LLScriptHandler::onDelete( LLNotificationPtr notification )
{
- if(SCRIPT_DIALOG == notification->getName() || SCRIPT_DIALOG_GROUP == notification->getName() || SCRIPT_LOAD_URL == notification->getName())
+ if(notification->hasFormElements())
{
LLScriptFloaterManager::getInstance()->onRemoveNotification(notification->getID());
}
@@ -132,17 +125,11 @@ void LLScriptHandler::onDelete( LLNotificationPtr notification )
void LLScriptHandler::onDeleteToast(LLToast* toast)
{
- // send a signal to the counter manager
- mDelNotificationSignal();
-
// send a signal to a listener to let him perform some action
// in this case listener is a SysWellWindow and it will remove a corresponding item from its list
- mNotificationIDSignal(toast->getNotificationID());
-
LLNotificationPtr notification = LLNotifications::getInstance()->find(toast->getNotificationID());
- if( notification &&
- (SCRIPT_DIALOG == notification->getName() || SCRIPT_DIALOG_GROUP == notification->getName()) )
+ if( notification && notification->hasFormElements())
{
LLScriptFloaterManager::getInstance()->onRemoveNotification(notification->getID());
}