1. simon_linden
  2. viewer-rabbit

Commits

simon_linden  committed 8e73dab

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

  • Participants
  • Parent commits 631214d
  • Branches default

Comments (0)

Files changed (3)

File indra/llinventory/llparcel.cpp

View file
 
 	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 );

File indra/llinventory/llparcel.h

View file
 	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;
 

File indra/newview/llfloaterland.cpp

View file
 
 		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);