summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterworldmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterworldmap.cpp')
-rw-r--r--indra/newview/llfloaterworldmap.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index d59f513925..e2e71f51fa 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -429,9 +429,19 @@ void LLFloaterWorldMap::reshape( S32 width, S32 height, BOOL called_from_parent
void LLFloaterWorldMap::draw()
{
// Hide/Show Mature Events controls
- childSetVisible("events_mature_icon", !gAgent.isTeen());
- childSetVisible("events_mature_label", !gAgent.isTeen());
- childSetVisible("event_mature_chk", !gAgent.isTeen());
+ childSetVisible("events_mature_icon", gAgent.canAccessMature());
+ childSetVisible("events_mature_label", gAgent.canAccessMature());
+ childSetVisible("event_mature_chk", gAgent.canAccessMature());
+
+ childSetVisible("events_adult_icon", gAgent.canAccessMature());
+ childSetVisible("events_adult_label", gAgent.canAccessMature());
+ childSetVisible("event_adult_chk", gAgent.canAccessMature());
+ bool adult_enabled = gAgent.canAccessAdult();
+ if (!adult_enabled)
+ {
+ childSetValue("event_adult_chk", FALSE);
+ }
+ childSetEnabled("event_adult_chk", adult_enabled);
// On orientation island, users don't have a home location yet, so don't
// let them teleport "home". It dumps them in an often-crowed welcome
@@ -1315,6 +1325,7 @@ void LLFloaterWorldMap::onCheckEvents(LLUICtrl*, void* data)
LLFloaterWorldMap* self = (LLFloaterWorldMap*)data;
if(!self) return;
self->childSetEnabled("event_mature_chk", self->childGetValue("event_chk"));
+ self->childSetEnabled("event_adult_chk", self->childGetValue("event_chk"));
}
// protected