diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-05-25 16:51:45 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-05-25 16:51:45 +0300 |
commit | 561cee12d8d3c456d71efae3b711dbf5115c66f5 (patch) | |
tree | 5c0bd6801165b3a692b240502211906bb0ee0157 /indra | |
parent | 7021f95b5b09951d834cfb757b3b842313f27d49 (diff) |
MAINT-2585 Make permission request notifications permanent until action taken
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llui/llnotifications.cpp | 6 | ||||
-rw-r--r-- | indra/llui/llnotifications.h | 1 | ||||
-rw-r--r-- | indra/llui/llnotificationtemplate.h | 3 | ||||
-rw-r--r-- | indra/newview/llnotificationofferhandler.cpp | 1 | ||||
-rw-r--r-- | indra/newview/llnotificationscripthandler.cpp | 1 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/notifications.xml | 3 |
6 files changed, 15 insertions, 0 deletions
diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 604092d536..c364c4d5ae 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -426,6 +426,7 @@ LLNotificationTemplate::LLNotificationTemplate(const LLNotificationTemplate::Par mLogToChat(p.log_to_chat), mLogToIM(p.log_to_im), mShowToast(p.show_toast), + mFadeToast(p.fade_toast), mSoundName("") { if (p.sound.isProvided() @@ -942,6 +943,11 @@ bool LLNotification::canShowToast() const return mTemplatep->mShowToast; } +bool LLNotification::canFadeToast() const +{ + return mTemplatep->mFadeToast; +} + bool LLNotification::hasFormElements() const { return mTemplatep->mForm->getNumElements() != 0; diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 024332ee65..4a701d0ca7 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -558,6 +558,7 @@ public: bool canLogToChat() const; bool canLogToIM() const; bool canShowToast() const; + bool canFadeToast() const; bool hasFormElements() const; void playSound(); diff --git a/indra/llui/llnotificationtemplate.h b/indra/llui/llnotificationtemplate.h index bed29254d8..20cbc89ede 100644 --- a/indra/llui/llnotificationtemplate.h +++ b/indra/llui/llnotificationtemplate.h @@ -177,6 +177,7 @@ struct LLNotificationTemplate Optional<bool> persist, log_to_im, show_toast, + fade_toast, log_to_chat, force_urls_external; Optional<std::string> functor, @@ -199,6 +200,7 @@ struct LLNotificationTemplate Params() : name("name"), persist("persist", false), + fade_toast("fade_toast", true), log_to_im("log_to_im", false), show_toast("show_toast", true), log_to_chat("log_to_chat", true), @@ -316,6 +318,7 @@ struct LLNotificationTemplate bool mLogToChat; bool mLogToIM; bool mShowToast; + bool mFadeToast; }; #endif //LL_LLNOTIFICATION_TEMPLATE_H diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp index 63ab88da42..14d25d8158 100644 --- a/indra/newview/llnotificationofferhandler.cpp +++ b/indra/newview/llnotificationofferhandler.cpp @@ -131,6 +131,7 @@ bool LLOfferHandler::processNotification(const LLNotificationPtr& notification) // we not save offer notifications to the syswell floater that should be added to the IM floater p.can_be_stored = !add_notif_to_im; p.force_show = notification->getOfferFromAgent(); + p.can_fade = notification->canFadeToast(); LLScreenChannel* channel = dynamic_cast<LLScreenChannel*>(mChannel.get()); if(channel) diff --git a/indra/newview/llnotificationscripthandler.cpp b/indra/newview/llnotificationscripthandler.cpp index 7acb2f9e90..fef0631fa6 100644 --- a/indra/newview/llnotificationscripthandler.cpp +++ b/indra/newview/llnotificationscripthandler.cpp @@ -77,6 +77,7 @@ void LLScriptHandler::addToastWithNotification(const LLNotificationPtr& notifica p.notification = notification; p.panel = notify_box; p.on_delete_toast = boost::bind(&LLScriptHandler::onDeleteToast, this, _1); + p.can_fade = notification->canFadeToast(); if(gAgent.isDoNotDisturb()) { p.force_show = notification->getName() == "SystemMessage" diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 8620c09f9a..91f3b7456f 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -7527,6 +7527,7 @@ Your object named <nolink>[OBJECTFROMNAME]</nolink> has given you th name="TeleportOffered" log_to_im="true" log_to_chat="false" + fade_toast="false" type="offer" sound="UISndNewIncomingIMSession"> [NAME_SLURL] has offered to teleport you to their location: @@ -7602,6 +7603,7 @@ However, this region contains content accessible to adults only. icon="notify.tga" name="TeleportRequest" log_to_im="true" + fade_toast="false" type="offer"> [NAME_SLURL] is requesting to be teleported to your location. [MESSAGE] @@ -7958,6 +7960,7 @@ Other Key Experiences may be available. icon="notify.tga" name="ScriptQuestionExperience" persist="false" + fade_toast="false" type="notify"> '<nolink>[OBJECTNAME]</nolink>', an object owned by '[NAME]', requests your participation in the [GRID_WIDE] experience: |