From f98f79be8fdec2cf4d234abe9c6837deef0a81e0 Mon Sep 17 00:00:00 2001
From: Vadim Savchuk <vsavchuk@productengine.com>
Date: Mon, 12 Apr 2010 15:20:27 +0300
Subject: Fixed major bug EXT-6590 (Preference> Maturity rating changes without
 direct user input).

Now we're notifying user that his/her maturity preference has been changed.

Reviewed by Mike: https://codereview.productengine.com/secondlife/r/216/

--HG--
branch : product-engine
---
 indra/newview/llviewermessage.cpp                    | 4 ++++
 indra/newview/skins/default/xui/en/notifications.xml | 7 +++++++
 2 files changed, 11 insertions(+)

diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index d8a3932a22..32df7d8410 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -4786,6 +4786,10 @@ bool handle_special_notification_callback(const LLSD& notification, const LLSD&
 		gSavedSettings.setU32("PreferredMaturity", preferredMaturity);
 		gAgent.sendMaturityPreferenceToServer(preferredMaturity);
 
+		// notify user that the maturity preference has been changed
+		LLSD args;
+		args["RATING"] = LLViewerRegion::accessToString(preferredMaturity);
+		LLNotificationsUtil::add("PreferredMaturityChanged", args);
 	}
 	
 	return false;
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index ff8de3514f..7f0e8891d7 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -3379,6 +3379,13 @@ You can click &apos;Change Preference&apos; to raise your maturity Rating prefer
     </form>
   </notification>
 
+  <notification
+   icon="notifytip.tga"
+   name="PreferredMaturityChanged"
+   type="notifytip">
+Your maturity rating preference is now [RATING].
+  </notification>
+
   <notification
    icon="alertmodal.tga"
    name="LandClaimAccessBlocked"
-- 
cgit v1.2.3