summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterregioninfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterregioninfo.cpp')
-rw-r--r--indra/newview/llfloaterregioninfo.cpp18
1 files changed, 14 insertions, 4 deletions
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<LLUICtrl>("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<LLUICtrl>("externally_visible_check")->getValue().asBoolean();
+ bool public_access = getChild<LLRadioGroup>("externally_visible_radio")->getSelectedIndex();
getChildView("Only Allow")->setEnabled(public_access);
getChildView("limit_payment")->setEnabled(public_access);
@@ -2311,7 +2313,7 @@ void LLPanelEstateInfo::refreshFromEstate()
getChild<LLUICtrl>("estate_name")->setValue(estate_info.getName());
setOwnerName(LLSLURL("agent", estate_info.getOwnerID(), "inspect").getSLURLString());
- getChild<LLUICtrl>("externally_visible_check")->setValue(estate_info.getIsExternallyVisible());
+ getChild<LLRadioGroup>("externally_visible_radio")->setSelectedIndex(estate_info.getIsExternallyVisible() ? 1 : 0);
getChild<LLUICtrl>("voice_chat_check")->setValue(estate_info.getAllowVoiceChat());
getChild<LLUICtrl>("allow_direct_teleport")->setValue(estate_info.getAllowDirectTeleport());
getChild<LLUICtrl>("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<LLUICtrl>("externally_visible_check")->getValue().asBoolean());
+ estate_info.setIsExternallyVisible(getChild<LLRadioGroup>("externally_visible_radio")->getSelectedIndex());
estate_info.setAllowDirectTeleport(getChild<LLUICtrl>("allow_direct_teleport")->getValue().asBoolean());
estate_info.setDenyAnonymous(getChild<LLUICtrl>("limit_payment")->getValue().asBoolean());
estate_info.setDenyAgeUnverified(getChild<LLUICtrl>("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<LLUICtrl>("parcel_access_override")->getValue().asBoolean())
+ {
+ LLNotificationsUtil::add("EstateParcelAccessOverride");
+ }
+}
+
LLPanelEstateCovenant::LLPanelEstateCovenant()
:
mCovenantID(LLUUID::null),