diff --git a/indra/llui/llnotifications.cpp b/indra/llui/llnotifications.cpp index 6710e9993dcadd8c7bf6f38e6c730e2c8c6b879d..7bafd711cb0223849f1936e823f092275c4ab2ec 100644 --- a/indra/llui/llnotifications.cpp +++ b/indra/llui/llnotifications.cpp @@ -67,7 +67,8 @@ LLNotificationForm::FormIgnore::FormIgnore() : text("text"), control("control"), invert_control("invert_control", false), - save_option("save_option", false) + save_option("save_option", false), + session_only("session_only", false) {} LLNotificationForm::FormButton::FormButton() @@ -125,6 +126,7 @@ bool handleIgnoredNotification(const LLSD& payload) switch(form->getIgnoreType()) { case LLNotificationForm::IGNORE_WITH_DEFAULT_RESPONSE: + case LLNotificationForm::IGNORE_WITH_DEFAULT_RESPONSE_SESSION_ONLY: response = pNotif->getResponseTemplate(LLNotification::WITH_DEFAULT_BUTTON); break; case LLNotificationForm::IGNORE_WITH_LAST_RESPONSE: @@ -197,7 +199,7 @@ LLNotificationForm::LLNotificationForm(const std::string& name, const LLNotifica if (!p.ignore.save_option) { - mIgnore = IGNORE_WITH_DEFAULT_RESPONSE; + mIgnore = p.ignore.session_only ? IGNORE_WITH_DEFAULT_RESPONSE_SESSION_ONLY : IGNORE_WITH_DEFAULT_RESPONSE; } else { diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index b06d7cbf4cda340a510d300b41e077c68dbe0e60..ccdfb90054938f91da1138ed0dd3d4661ab6f5f4 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -179,6 +179,7 @@ class LLNotificationForm Optional<bool> save_option; Optional<std::string> control; Optional<bool> invert_control; + Optional<bool> session_only; FormIgnore(); }; @@ -232,7 +233,8 @@ class LLNotificationForm typedef enum e_ignore_type { IGNORE_NO, - IGNORE_WITH_DEFAULT_RESPONSE, + IGNORE_WITH_DEFAULT_RESPONSE, + IGNORE_WITH_DEFAULT_RESPONSE_SESSION_ONLY, IGNORE_WITH_LAST_RESPONSE, IGNORE_SHOW_AGAIN } EIgnoreType; diff --git a/indra/newview/lltoastalertpanel.cpp b/indra/newview/lltoastalertpanel.cpp index bbce717c20c9a602002d30270b9b846f9f98c28f..dbf0893e433dc03042959436138d2dfb601f37a7 100644 --- a/indra/newview/lltoastalertpanel.cpp +++ b/indra/newview/lltoastalertpanel.cpp @@ -351,6 +351,10 @@ LLToastAlertPanel::LLToastAlertPanel( LLNotificationPtr notification, bool modal { setCheckBox(LLNotifications::instance().getGlobalString("skipnexttime"), ignore_label); } + if (form->getIgnoreType() == LLNotificationForm::IGNORE_WITH_DEFAULT_RESPONSE_SESSION_ONLY) + { + setCheckBox(LLNotifications::instance().getGlobalString("skipnexttimesessiononly"), ignore_label); + } else if (form->getIgnoreType() == LLNotificationForm::IGNORE_WITH_LAST_RESPONSE) { setCheckBox(LLNotifications::instance().getGlobalString("alwayschoose"), ignore_label); diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index 71b0edb57202d65cb3b3d7b7a20327b5f75b17aa..3ca7feae170d8173ce624644ea6bf701c1d77661 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -4,6 +4,11 @@ Don't show me this again </global> + <global name="skipnexttimesessiononly"> + + Don't show me this again (for this session only) + </global> + <global name="alwayschoose"> Always choose this option @@ -6004,11 +6009,20 @@ You cannot undo this action. <unique/> [QUESTION] <tag>confirm</tag> - <usetemplate - ignoretext="Confirm before deleting items" - name="okcancelignore" - notext="Cancel" - yestext="OK"/> + <form name="form"> + <ignore name="ignore" + session_only="true" + text="Confirm before deleting items"/> + <button + default="true" + index="0" + name="Yes" + text="OK"/> + <button + index="1" + name="No" + text="Cancel"/> + </form> </notification> <notification