summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llnotificationscripthandler.cpp42
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml3
2 files changed, 24 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 )
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 64db7cd969..933135954f 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -6742,6 +6742,7 @@ If you stay in this region you will be logged out.
<notification
icon="notify.tga"
name="LoadWebPage"
+ show_toast="false"
type="notify">
Load web page [URL]?
@@ -6844,6 +6845,7 @@ It is rare that such a request is legitimate. Do not allow access if you do not
<notification
icon="notify.tga"
name="ScriptDialog"
+ show_toast="false"
type="notify">
[NAME]&apos;s &apos;&lt;nolink&gt;[TITLE]&lt;/nolink&gt;&apos;
[MESSAGE]
@@ -6862,6 +6864,7 @@ It is rare that such a request is legitimate. Do not allow access if you do not
<notification
icon="notify.tga"
name="ScriptDialogGroup"
+ show_toast="false"
type="notify">
<tag>group</tag>
[GROUPNAME]&apos;s &apos;&lt;nolink&gt;[TITLE]&lt;/nolink&gt;&apos;