summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llinventory/llparcel.cpp10
-rw-r--r--indra/llinventory/llparcel.h12
-rw-r--r--indra/llmessage/message_prehash.cpp1
-rw-r--r--indra/llmessage/message_prehash.h1
-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
7 files changed, 51 insertions, 4 deletions
diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp
index 0a4cd51ea0..7562bb8320 100644
--- a/indra/llinventory/llparcel.cpp
+++ b/indra/llinventory/llparcel.cpp
@@ -702,7 +702,7 @@ void LLParcel::packMessage(LLSD& msg)
msg["user_location"] = ll_sd_from_vector3(mUserLocation);
msg["user_look_at"] = ll_sd_from_vector3(mUserLookAt);
msg["landing_type"] = (U8)mLandingType;
-
+ msg["privacy"] = (LLSD::Boolean) getPrivacy();
}
@@ -721,6 +721,14 @@ void LLParcel::unpackMessage(LLMessageSystem* msg)
msg->getStringFast( _PREHASH_ParcelData,_PREHASH_MediaURL, buffer );
setMediaURL(buffer);
+ BOOL private_parcel = FALSE;
+ bool have_privacy_data = (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_Privacy) > 0);
+ if (have_privacy_data)
+ {
+ msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_Privacy, private_parcel);
+ }
+ setPrivacy((bool) private_parcel);
+
// non-optimized version
msg->getU8 ( "ParcelData", "MediaAutoScale", mMediaAutoScale );
diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h
index 71b65d99ce..4d2236ec66 100644
--- a/indra/llinventory/llparcel.h
+++ b/indra/llinventory/llparcel.h
@@ -75,7 +75,7 @@ const U8 PARCEL_AUCTION = 0x05;
// unused 0x06
// unused 0x07
// flag, unused 0x08
-// flag, unused 0x10
+const U8 PARCEL_PRIVATE = 0x10;
const U8 PARCEL_SOUND_LOCAL = 0x20;
const U8 PARCEL_WEST_LINE = 0x40; // flag, property line on west edge
const U8 PARCEL_SOUTH_LINE = 0x80; // flag, property line on south edge
@@ -130,6 +130,12 @@ class LLSD;
class LLAccessEntry
{
public:
+ LLAccessEntry()
+ : mID(),
+ mTime(0),
+ mFlags(0)
+ {}
+
LLUUID mID; // Agent ID
S32 mTime; // Time (unix seconds) when entry expires
U32 mFlags; // Not used - currently should always be zero
@@ -265,6 +271,7 @@ public:
void setUserLocation(const LLVector3& pos) { mUserLocation = pos; }
void setUserLookAt(const LLVector3& rot) { mUserLookAt = rot; }
void setLandingType(const ELandingType type) { mLandingType = type; }
+ void setPrivacy(bool privacy) { mPrivacy = privacy; }
void setAuctionID(U32 auction_id) { mAuctionID = auction_id;}
@@ -367,6 +374,8 @@ public:
const LLVector3& getUserLocation() const { return mUserLocation; }
const LLVector3& getUserLookAt() const { return mUserLookAt; }
ELandingType getLandingType() const { return mLandingType; }
+ bool getPrivacy() const { return mPrivacy; }
+
// User-specified snapshot
const LLUUID& getSnapshotID() const { return mSnapshotID; }
@@ -602,6 +611,7 @@ protected:
LLVector3 mUserLocation;
LLVector3 mUserLookAt;
ELandingType mLandingType;
+ bool mPrivacy;
LLTimer mSaleTimerExpires;
LLTimer mMediaResetTimer;
diff --git a/indra/llmessage/message_prehash.cpp b/indra/llmessage/message_prehash.cpp
index 5d03615e53..020ece5414 100644
--- a/indra/llmessage/message_prehash.cpp
+++ b/indra/llmessage/message_prehash.cpp
@@ -1375,3 +1375,4 @@ char const* const _PREHASH_VCoord = LLMessageStringTable::getInstance()->getStri
char const* const _PREHASH_FaceIndex = LLMessageStringTable::getInstance()->getString("FaceIndex");
char const* const _PREHASH_StatusData = LLMessageStringTable::getInstance()->getString("StatusData");
char const* const _PREHASH_ProductSKU = LLMessageStringTable::getInstance()->getString("ProductSKU");
+char const* const _PREHASH_Privacy = LLMessageStringTable::getInstance()->getString("Privacy");
diff --git a/indra/llmessage/message_prehash.h b/indra/llmessage/message_prehash.h
index 8dc86601e6..32bf882d90 100644
--- a/indra/llmessage/message_prehash.h
+++ b/indra/llmessage/message_prehash.h
@@ -1375,4 +1375,5 @@ extern char const* const _PREHASH_VCoord;
extern char const* const _PREHASH_FaceIndex;
extern char const* const _PREHASH_StatusData;
extern char const* const _PREHASH_ProductSKU;
+extern char const* const _PREHASH_Privacy;
#endif
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"