summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorDave SIMmONs <simon@lindenlab.com>2011-05-02 16:35:55 -0700
committerDave SIMmONs <simon@lindenlab.com>2011-05-02 16:35:55 -0700
commit9bfae21706288802f94d642eb252ac78b4d9e85c (patch)
treefe02b30f05ba6a515212e35a018e97a81a27dfed /indra/newview
parentf393774caf49313f24d33cb2b33b6ad92c70977f (diff)
ER-858: Add viewer checkbox to toggle parcel privacy settings. Reviewed by Kelly
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloaterland.cpp13
-rw-r--r--indra/newview/llfloaterland.h1
-rw-r--r--indra/newview/skins/default/xui/en/floater_about_land.xml17
3 files changed, 29 insertions, 2 deletions
diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp
index 7be4ebc690..1ebcae4e5c 100644
--- a/indra/newview/llfloaterland.cpp
+++ b/indra/newview/llfloaterland.cpp
@@ -1817,6 +1817,7 @@ LLPanelLandOptions::LLPanelLandOptions(LLParcelSelectionHandle& parcel)
mClearBtn(NULL),
mMatureCtrl(NULL),
mPushRestrictionCtrl(NULL),
+ mPrivateParcelCtrl(NULL),
mParcel(parcel)
{
}
@@ -1859,6 +1860,9 @@ BOOL LLPanelLandOptions::postBuild()
mPushRestrictionCtrl = getChild<LLCheckBoxCtrl>( "PushRestrictCheck");
childSetCommitCallback("PushRestrictCheck", onCommitAny, this);
+ mPrivateParcelCtrl = getChild<LLCheckBoxCtrl>( "PrivateParcelCheck");
+ childSetCommitCallback("PrivateParcelCheck", onCommitAny, this);
+
mCheckShowDirectory = getChild<LLCheckBoxCtrl>( "ShowDirectoryCheck");
childSetCommitCallback("ShowDirectoryCheck", onCommitAny, this);
@@ -1967,6 +1971,9 @@ void LLPanelLandOptions::refresh()
mPushRestrictionCtrl->set(FALSE);
mPushRestrictionCtrl->setEnabled(FALSE);
+ mPrivateParcelCtrl->set(FALSE);
+ mPrivateParcelCtrl->setEnabled(FALSE);
+
mLandingTypeCombo->setCurrentByIndex(0);
mLandingTypeCombo->setEnabled(FALSE);
@@ -2026,6 +2033,10 @@ void LLPanelLandOptions::refresh()
mPushRestrictionCtrl->setEnabled(can_change_options);
}
+ mPrivateParcelCtrl->set(parcel->getPrivacy());
+ mPrivateParcelCtrl->setLabel(getString("private_parcel_text"));
+ mPrivateParcelCtrl->setEnabled(can_change_options);
+
BOOL can_change_landing_point = LLViewerParcelMgr::isParcelModifiableByAgent(parcel,
GP_LAND_SET_LANDING_POINT);
mLandingTypeCombo->setCurrentByIndex((S32)parcel->getLandingType());
@@ -2230,6 +2241,7 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata)
BOOL allow_publish = FALSE;
BOOL mature_publish = self->mMatureCtrl->get();
BOOL push_restriction = self->mPushRestrictionCtrl->get();
+ BOOL private_parcel = self->mPrivateParcelCtrl->get();
BOOL show_directory = self->mCheckShowDirectory->get();
// we have to get the index from a lookup, not from the position in the dropdown!
S32 category_index = LLParcel::getCategoryFromString(self->mCategoryCombo->getSelectedValue());
@@ -2263,6 +2275,7 @@ void LLPanelLandOptions::onCommitAny(LLUICtrl *ctrl, void *userdata)
parcel->setCategory((LLParcel::ECategory)category_index);
parcel->setLandingType((LLParcel::ELandingType)landing_type_index);
parcel->setSnapshotID(snapshot_id);
+ parcel->setPrivacy(private_parcel);
// Send current parcel data upstream to server
LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel );
diff --git a/indra/newview/llfloaterland.h b/indra/newview/llfloaterland.h
index a096fb64cd..ff1fb62041 100644
--- a/indra/newview/llfloaterland.h
+++ b/indra/newview/llfloaterland.h
@@ -347,6 +347,7 @@ private:
LLCheckBoxCtrl *mMatureCtrl;
LLCheckBoxCtrl *mPushRestrictionCtrl;
+ LLCheckBoxCtrl *mPrivateParcelCtrl;
LLSafeHandle<LLParcelSelection>& mParcel;
};
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 6e985e0476..d2567e8197 100644
--- a/indra/newview/skins/default/xui/en/floater_about_land.xml
+++ b/indra/newview/skins/default/xui/en/floater_about_land.xml
@@ -1204,6 +1204,10 @@ Only large parcels can be listed in search.
name="push_restrict_region_text">
No Pushing (Region Override)
</panel.string>
+ <panel.string
+ name="private_parcel_text">
+ Private Parcel
+ </panel.string>
<text
type="string"
length="1"
@@ -1333,7 +1337,7 @@ Only large parcels can be listed in search.
name="check safe"
tool_tip="If checked, sets the land to Safe, disabling damage combat. If cleared, damage combat is enabled."
top_pad="5"
- width="200" />
+ width="280" />
<check_box
height="16"
label="No Pushing"
@@ -1350,7 +1354,16 @@ Only large parcels can be listed in search.
left="14"
name="ShowDirectoryCheck"
tool_tip="Let people see this parcel in search results"
- width="430" />
+ width="280" />
+ <check_box
+ height="16"
+ label="Private Parcel"
+ layout="topleft"
+ left_pad="5"
+ name="PrivateParcelCheck"
+ tool_tip="Prevents avatars from seeing into or out of the parcel."
+ top_delta="0"
+ width="119" />
<combo_box
enabled="false"
height="23"