summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorTodd Stinson <stinson@lindenlab.com>2012-05-17 18:01:42 -0700
committerTodd Stinson <stinson@lindenlab.com>2012-05-17 18:01:42 -0700
commitffdd6812ca7ee0d497766aff04c91b30d1bbc63d (patch)
treee8a2214437d523f816206127d3da37c47b000070 /indra
parentd52529ca2a97b31891e8e36e0327f8d5799b4b08 (diff)
EPX-1938: Adding a special behavior for the NotAgeVerified notification to display either an ignorable modal dialog or a toast-style notification. Also, altering the copy for the notifications.
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llviewermessage.cpp29
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml26
2 files changed, 41 insertions, 14 deletions
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index f84ada18ab..bb48391fe0 100755
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -5683,6 +5683,30 @@ void process_alert_message(LLMessageSystem *msgsystem, void **user_data)
}
}
+bool handle_not_age_verified_alert(const std::string &pAlertName)
+{
+ LLNotificationPtr notification = LLNotificationsUtil::add(pAlertName);
+ if ((notification == NULL) || notification->isIgnored())
+ {
+ LLNotificationsUtil::add(pAlertName + "_Notify");
+ }
+
+ return true;
+}
+
+bool handle_special_alerts(const std::string &pAlertName)
+{
+ bool isHandled = false;
+
+ if (LLStringUtil::compareStrings(pAlertName, "NotAgeVerified") == 0)
+ {
+
+ isHandled = handle_not_age_verified_alert(pAlertName);
+ }
+
+ return isHandled;
+}
+
void process_alert_core(const std::string& message, BOOL modal)
{
// HACK -- handle callbacks for specific alerts. It also is localized in notifications.xml
@@ -5706,7 +5730,10 @@ void process_alert_core(const std::string& message, BOOL modal)
// Allow the server to spawn a named alert so that server alerts can be
// translated out of English.
std::string alert_name(message.substr(ALERT_PREFIX.length()));
- LLNotificationsUtil::add(alert_name);
+ if (!handle_special_alerts(alert_name))
+ {
+ LLNotificationsUtil::add(alert_name);
+ }
}
else if (message.find(NOTIFY_PREFIX) == 0)
{
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index cd28b5a770..fd153aba1f 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -5142,20 +5142,20 @@ Would you like to automatically wear the clothing you are about to create?
icon="alertmodal.tga"
name="NotAgeVerified"
type="alertmodal">
- <tag>fail</tag>
-To access adult content and areas in Second Life you must be at least 18 years old. Please visit our age verification page to confirm you are over 18.
-Note this will launch your web browser.
-
-[_URL]
- <tag>confirm</tag>
- <url option="0" name="url">
- https://secondlife.com/my/account/verification.php
- </url>
+ The location you're trying to visit is restricted to residents age 18 and over.
+ <tag>fail</tag>
<usetemplate
- ignoretext="I have not verified my age"
- name="okcancelignore"
- notext="Cancel"
- yestext="Go to Age Verification"/>
+ ignoretext="I am not old enough to visit age restricted areas."
+ name="okignore"
+ yestext="OK"/>
+ </notification>
+
+ <notification
+ icon="notifytip.tga"
+ name="NotAgeVerified_Notify"
+ type="notifytip">
+ Location restricted to age 18 and over.
+ <tag>fail</tag>
</notification>
<notification