simon_linden avatar simon_linden committed 8e73dab

ER-914: Disable Parcel Privacy UI in viewer if on older sim

Comments (0)

Files changed (3)

indra/llinventory/llparcel.cpp

 
 	setPreviousOwnerID(LLUUID::null);
 	setPreviouslyGroupOwned(FALSE);
+
+	setPrivacy(false);
+	setHavePrivacyData(false);
 }
 
 void LLParcel::overrideOwner(const LLUUID& owner_id, BOOL is_group_owned)
 		msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_Privacy, private_parcel);
 	}
 	setPrivacy((bool) private_parcel);
+	setHavePrivacyData(have_privacy_data);
 
     // non-optimized version
     msg->getU8 ( "ParcelData", "MediaAutoScale", mMediaAutoScale );

indra/llinventory/llparcel.h

 	void setUserLookAt(const LLVector3& rot)	{ mUserLookAt = rot; }
 	void setLandingType(const ELandingType type) { mLandingType = type; }
 	void setPrivacy(bool privacy)	{ mPrivacy = privacy;	}
+	void setHavePrivacyData(bool have_privacy_data)		{ mHavePrivacyData = have_privacy_data;		}		// Remove this once parcel privacy is fully available grid-wide
 
 	void setAuctionID(U32 auction_id) { mAuctionID = auction_id;}
 
 	const LLVector3& getUserLookAt() const	{ return mUserLookAt; }
 	ELandingType getLandingType() const	{ return mLandingType; }
 	bool getPrivacy() const				{ return mPrivacy;		}
-
+	bool getHavePrivacyData() const		{ return mHavePrivacyData;	}
 
 	// User-specified snapshot
 	const LLUUID&	getSnapshotID() const		{ return mSnapshotID; }
 	LLVector3 mUserLookAt;
 	ELandingType mLandingType;
 	bool mPrivacy;
+	bool mHavePrivacyData;			// Remove once parcel privacy is grid-wide
 	LLTimer mSaleTimerExpires;
 	LLTimer mMediaResetTimer;
 

indra/newview/llfloaterland.cpp

 
 		mPrivateParcelCtrl->set(parcel->getPrivacy());
 		mPrivateParcelCtrl->setLabel(getString("private_parcel_text"));
-		mPrivateParcelCtrl->setEnabled(can_change_options);
+		mPrivateParcelCtrl->setEnabled(can_change_options && parcel->getHavePrivacyData());
 
 		BOOL can_change_landing_point = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, 
 														GP_LAND_SET_LANDING_POINT);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.