diff options
author | Seth ProductEngine <slitovchuk@productengine.com> | 2012-08-21 19:51:41 +0300 |
---|---|---|
committer | Seth ProductEngine <slitovchuk@productengine.com> | 2012-08-21 19:51:41 +0300 |
commit | 8922dec40039a10e770243f3047793f8501fe43a (patch) | |
tree | 71433b9b13890f0e20b276b89f63da9b90781b83 | |
parent | b93e2f7c84a8e14d7ca6c58c35183216a7fbf5bb (diff) |
CHUI-293 CHUI-294 FIXED displaying Group Invite and Transfer Object as notifications, instead of displaying as messages from an object.
Restored the exception in handling "LoadWebPage", "ScriptDialog" and "ScriptDialogGroup" notifications, that caused only those notifications to be shown as messages from an object.
-rw-r--r-- | indra/newview/llnotificationscripthandler.cpp | 42 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 3 |
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]'s '<nolink>[TITLE]</nolink>' [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]'s '<nolink>[TITLE]</nolink>' |