diff options
| author | Dave SIMmONs <simon@lindenlab.com> | 2011-05-02 16:35:55 -0700 |
|---|---|---|
| committer | Dave SIMmONs <simon@lindenlab.com> | 2011-05-02 16:35:55 -0700 |
| commit | 9bfae21706288802f94d642eb252ac78b4d9e85c (patch) | |
| tree | fe02b30f05ba6a515212e35a018e97a81a27dfed /indra/newview/llfloaterland.cpp | |
| parent | f393774caf49313f24d33cb2b33b6ad92c70977f (diff) | |
ER-858: Add viewer checkbox to toggle parcel privacy settings. Reviewed by Kelly
Diffstat (limited to 'indra/newview/llfloaterland.cpp')
| -rw-r--r-- | indra/newview/llfloaterland.cpp | 13 |
1 files changed, 13 insertions, 0 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 ); |
