From 07f913b06273f83a603679d150e653db90395914 Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Sat, 29 Apr 2017 00:45:12 +0300 Subject: MAINT-7324 Changes to Region/Estate and About Land floaters to clarify and add functionality --- indra/newview/llfloaterland.cpp | 3 +- indra/newview/llfloaterregioninfo.cpp | 18 ++++- indra/newview/llfloaterregioninfo.h | 1 + .../skins/default/xui/en/floater_about_land.xml | 48 ++++++------ .../newview/skins/default/xui/en/notifications.xml | 11 +++ .../skins/default/xui/en/panel_region_estate.xml | 88 ++++++++++++---------- indra/newview/skins/default/xui/en/strings.xml | 10 +-- 7 files changed, 105 insertions(+), 74 deletions(-) diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index abe9f99914..4352909706 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2678,7 +2678,8 @@ void LLPanelLandAccess::refresh_ui() std::string group_name; if (gCacheName->getGroupName(parcel->getGroupID(), group_name)) { - getChildView("GroupCheck")->setEnabled(can_manage_allowed); + bool can_allow_groups = !public_access || (public_access && (getChild("limit_payment")->getValue().asBoolean() ^ getChild("limit_age_verified")->getValue().asBoolean())); + getChildView("GroupCheck")->setEnabled(can_manage_allowed && can_allow_groups); } getChildView("AccessList")->setEnabled(can_manage_allowed); S32 allowed_list_count = parcel->mAccessList.size(); diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index f4bc3302ba..5e6d967334 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -2231,7 +2231,7 @@ bool LLPanelEstateInfo::estateUpdate(LLMessageSystem* msg) BOOL LLPanelEstateInfo::postBuild() { // set up the callbacks for the generic controls - initCtrl("externally_visible_check"); + initCtrl("externally_visible_radio"); initCtrl("allow_direct_teleport"); initCtrl("limit_payment"); initCtrl("limit_age_verified"); @@ -2284,13 +2284,15 @@ BOOL LLPanelEstateInfo::postBuild() childSetAction("message_estate_btn", boost::bind(&LLPanelEstateInfo::onClickMessageEstate, this)); childSetAction("kick_user_from_estate_btn", boost::bind(&LLPanelEstateInfo::onClickKickUser, this)); + getChild("parcel_access_override")->setCommitCallback(boost::bind(&LLPanelEstateInfo::onChangeAccessOverride, this)); + return LLPanelRegionInfo::postBuild(); } void LLPanelEstateInfo::refresh() { // Disable access restriction controls if they make no sense. - bool public_access = getChild("externally_visible_check")->getValue().asBoolean(); + bool public_access = getChild("externally_visible_radio")->getSelectedIndex(); getChildView("Only Allow")->setEnabled(public_access); getChildView("limit_payment")->setEnabled(public_access); @@ -2311,7 +2313,7 @@ void LLPanelEstateInfo::refreshFromEstate() getChild("estate_name")->setValue(estate_info.getName()); setOwnerName(LLSLURL("agent", estate_info.getOwnerID(), "inspect").getSLURLString()); - getChild("externally_visible_check")->setValue(estate_info.getIsExternallyVisible()); + getChild("externally_visible_radio")->setSelectedIndex(estate_info.getIsExternallyVisible() ? 1 : 0); getChild("voice_chat_check")->setValue(estate_info.getAllowVoiceChat()); getChild("allow_direct_teleport")->setValue(estate_info.getAllowDirectTeleport()); getChild("limit_payment")->setValue(estate_info.getDenyAnonymous()); @@ -2354,7 +2356,7 @@ bool LLPanelEstateInfo::callbackChangeLindenEstate(const LLSD& notification, con // update model estate_info.setUseFixedSun(false); // we don't support fixed sun estates anymore - estate_info.setIsExternallyVisible(getChild("externally_visible_check")->getValue().asBoolean()); + estate_info.setIsExternallyVisible(getChild("externally_visible_radio")->getSelectedIndex()); estate_info.setAllowDirectTeleport(getChild("allow_direct_teleport")->getValue().asBoolean()); estate_info.setDenyAnonymous(getChild("limit_payment")->getValue().asBoolean()); estate_info.setDenyAgeUnverified(getChild("limit_age_verified")->getValue().asBoolean()); @@ -2462,6 +2464,14 @@ bool LLPanelEstateInfo::onMessageCommit(const LLSD& notification, const LLSD& re return false; } +void LLPanelEstateInfo::onChangeAccessOverride() +{ + if (!getChild("parcel_access_override")->getValue().asBoolean()) + { + LLNotificationsUtil::add("EstateParcelAccessOverride"); + } +} + LLPanelEstateCovenant::LLPanelEstateCovenant() : mCovenantID(LLUUID::null), diff --git a/indra/newview/llfloaterregioninfo.h b/indra/newview/llfloaterregioninfo.h index dbb0ad05e9..c9d0e51640 100644 --- a/indra/newview/llfloaterregioninfo.h +++ b/indra/newview/llfloaterregioninfo.h @@ -274,6 +274,7 @@ public: void onChangeFixedSun(); void onChangeUseGlobalTime(); + void onChangeAccessOverride(); void onClickEditSky(); void onClickEditSkyHelp(); diff --git a/indra/newview/skins/default/xui/en/floater_about_land.xml b/indra/newview/skins/default/xui/en/floater_about_land.xml index a137770e26..535af317d9 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -1896,49 +1896,37 @@ Only large parcels can be listed in search. layout="topleft" left="8" name="public_access" - label="Allow Public Access (Unchecking this will create ban lines)" + label="Anyone can visit (Unchecking this will create ban lines)" top_pad="10" width="278" /> - - Allow access only to Residents who: - + + (The estate owner may have limited these choices) + - Allowed Residents ([COUNT], max [MAX]) + Always allowed ([COUNT], max [MAX]) - Banned Residents ([COUNT], max [MAX]) + Always banned ([COUNT], max [MAX]) + +Unchecking this option may remove restrictions that parcel owners have added to prevent griefing, maintain privacy, or protect underage residents from adult material. Please discuss with your parcel owners as needed. + confirm + + + - - + - + left="20" + width="200"> + + + Allow access only to Residents who: @@ -173,7 +181,7 @@ height="20" layout="topleft" name="estate_manager_label" - top_pad="30" + top_pad="25" left="10" width="200"> Estate Managers: @@ -188,7 +196,7 @@ name="allow_resident_label" top_delta="0" width="200"> - Allowed Residents: + Always allowed: @@ -199,7 +207,7 @@ layout="topleft" left="10" top_pad="-5" - width="200" /> + width="235" /> + width="235" /> - + + width="235" /> + width="235" />