diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llinventory/llparcel.cpp | 23 | ||||
-rw-r--r-- | indra/llinventory/llparcel.h | 19 | ||||
-rw-r--r-- | indra/llmessage/message_prehash.cpp | 2 | ||||
-rw-r--r-- | indra/llmessage/message_prehash.h | 2 | ||||
-rw-r--r-- | indra/newview/llfloaterland.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llpanellandaudio.cpp | 22 | ||||
-rw-r--r-- | indra/newview/llpanellandaudio.h | 2 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_about_land.xml | 28 |
8 files changed, 88 insertions, 12 deletions
diff --git a/indra/llinventory/llparcel.cpp b/indra/llinventory/llparcel.cpp index b388d34580..e026ad32f9 100644 --- a/indra/llinventory/llparcel.cpp +++ b/indra/llinventory/llparcel.cpp @@ -227,8 +227,10 @@ void LLParcel::init(const LLUUID &owner_id, setPreviousOwnerID(LLUUID::null); setPreviouslyGroupOwned(FALSE); - setHiddenAVs(false); - setHaveHiddenAVsData(false); + setHiddenAVs(FALSE); + setAllowGroupAVSounds(TRUE); + setAllowAnyAVSounds(TRUE); + setHaveNewParcelLimitData(FALSE); } void LLParcel::overrideOwner(const LLUUID& owner_id, BOOL is_group_owned) @@ -706,6 +708,8 @@ void LLParcel::packMessage(LLSD& msg) msg["user_look_at"] = ll_sd_from_vector3(mUserLookAt); msg["landing_type"] = (U8)mLandingType; msg["hidden_avs"] = (LLSD::Boolean) getHiddenAVs(); + msg["group_av_sounds"] = (LLSD::Boolean) getAllowGroupAVSounds(); + msg["any_av_sounds"] = (LLSD::Boolean) getAllowAnyAVSounds(); } @@ -725,13 +729,22 @@ void LLParcel::unpackMessage(LLMessageSystem* msg) setMediaURL(buffer); BOOL hidden_avs = FALSE; - bool have_hidden_av_data = (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_HiddenAVs) > 0); - if (have_hidden_av_data) + BOOL any_av_sounds = TRUE; + BOOL group_av_sounds = TRUE; + bool have_new_parcel_limit_data = (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_HiddenAVs) > 0); // New version of server should send all 3 of these values + have_new_parcel_limit_data &= (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_AnyAVSounds) > 0); + have_new_parcel_limit_data &= (msg->getSizeFast(_PREHASH_ParcelData, _PREHASH_GroupAVSounds) > 0); + if (have_new_parcel_limit_data) { msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_HiddenAVs, hidden_avs); + msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_AnyAVSounds, any_av_sounds); + msg->getBOOLFast(_PREHASH_ParcelData, _PREHASH_GroupAVSounds, group_av_sounds); } setHiddenAVs((bool) hidden_avs); - setHaveHiddenAVsData(have_hidden_av_data); + setAllowAnyAVSounds((bool) any_av_sounds); + setAllowGroupAVSounds((bool) group_av_sounds); + + setHaveNewParcelLimitData(have_new_parcel_limit_data); // non-optimized version msg->getU8 ( "ParcelData", "MediaAutoScale", mMediaAutoScale ); diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h index e785dba91b..c27e5a5091 100644 --- a/indra/llinventory/llparcel.h +++ b/indra/llinventory/llparcel.h @@ -271,8 +271,8 @@ public: void setUserLocation(const LLVector3& pos) { mUserLocation = pos; } void setUserLookAt(const LLVector3& rot) { mUserLookAt = rot; } void setLandingType(const ELandingType type) { mLandingType = type; } - void setHiddenAVs(bool hidden_avs) { mHiddenAVs = hidden_avs; } - void setHaveHiddenAVsData(bool have_hidden_av_data) { mHaveHiddenAVData = have_hidden_av_data; } // Remove this once hidden AV feature is fully available grid-wide + void setHiddenAVs(BOOL hidden_avs) { mHiddenAVs = hidden_avs; } + void setHaveNewParcelLimitData(bool have_new_parcel_data) { mHaveNewParcelLimitData = have_new_parcel_data; } // Remove this once hidden AV feature is fully available grid-wide void setAuctionID(U32 auction_id) { mAuctionID = auction_id;} @@ -299,6 +299,8 @@ public: void setDenyAnonymous(BOOL b) { setParcelFlag(PF_DENY_ANONYMOUS, b); } void setDenyAgeUnverified(BOOL b) { setParcelFlag(PF_DENY_AGEUNVERIFIED, b); } void setRestrictPushObject(BOOL b) { setParcelFlag(PF_RESTRICT_PUSHOBJECT, b); } + void setAllowGroupAVSounds(BOOL b) { mAllowGroupAVSounds = b; } + void setAllowAnyAVSounds(BOOL b) { mAllowAnyAVSounds = b; } void setDrawDistance(F32 dist) { mDrawDistance = dist; } void setSalePrice(S32 price) { mSalePrice = price; } @@ -375,8 +377,8 @@ public: const LLVector3& getUserLocation() const { return mUserLocation; } const LLVector3& getUserLookAt() const { return mUserLookAt; } ELandingType getLandingType() const { return mLandingType; } - bool getHiddenAVs() const { return mHiddenAVs; } - bool getHaveHiddenAVsData() const { return mHaveHiddenAVData; } + BOOL getHiddenAVs() const { return mHiddenAVs; } + BOOL getHaveNewParcelLimitData() const { return mHaveNewParcelLimitData; } // User-specified snapshot const LLUUID& getSnapshotID() const { return mSnapshotID; } @@ -506,6 +508,9 @@ public: BOOL getRegionDenyAgeUnverifiedOverride() const { return mRegionDenyAgeUnverifiedOverride; } + BOOL getAllowGroupAVSounds() const { return mAllowGroupAVSounds; } + BOOL getAllowAnyAVSounds() const { return mAllowAnyAVSounds; } + F32 getDrawDistance() const { return mDrawDistance; } S32 getSalePrice() const { return mSalePrice; } time_t getClaimDate() const { return mClaimDate; } @@ -616,8 +621,8 @@ protected: LLVector3 mUserLocation; LLVector3 mUserLookAt; ELandingType mLandingType; - bool mHiddenAVs; // Avatars are hidden on this parcel from outside it - bool mHaveHiddenAVData; // Remove once hidden AV feature is grid-wide + BOOL mHiddenAVs; // Avatars are hidden on this parcel from outside it + BOOL mHaveNewParcelLimitData; // Remove once hidden AV feature is grid-wide LLTimer mSaleTimerExpires; LLTimer mMediaResetTimer; @@ -673,6 +678,8 @@ protected: BOOL mRegionPushOverride; BOOL mRegionDenyAnonymousOverride; BOOL mRegionDenyAgeUnverifiedOverride; + BOOL mAllowGroupAVSounds; + BOOL mAllowAnyAVSounds; ParcelQuota mQuota; diff --git a/indra/llmessage/message_prehash.cpp b/indra/llmessage/message_prehash.cpp index 1248436f16..f7615b5ccb 100644 --- a/indra/llmessage/message_prehash.cpp +++ b/indra/llmessage/message_prehash.cpp @@ -1376,3 +1376,5 @@ char const* const _PREHASH_FaceIndex = LLMessageStringTable::getInstance()->getS char const* const _PREHASH_StatusData = LLMessageStringTable::getInstance()->getString("StatusData"); char const* const _PREHASH_ProductSKU = LLMessageStringTable::getInstance()->getString("ProductSKU"); char const* const _PREHASH_HiddenAVs = LLMessageStringTable::getInstance()->getString("HiddenAVs"); +char const* const _PREHASH_AnyAVSounds = LLMessageStringTable::getInstance()->getString("AnyAVSounds"); +char const* const _PREHASH_GroupAVSounds = LLMessageStringTable::getInstance()->getString("GroupAVSounds"); diff --git a/indra/llmessage/message_prehash.h b/indra/llmessage/message_prehash.h index f871caa3df..44c7440436 100644 --- a/indra/llmessage/message_prehash.h +++ b/indra/llmessage/message_prehash.h @@ -1376,4 +1376,6 @@ extern char const* const _PREHASH_FaceIndex; extern char const* const _PREHASH_StatusData; extern char const* const _PREHASH_ProductSKU; extern char const* const _PREHASH_HiddenAVs; +extern char const* const _PREHASH_AnyAVSounds; +extern char const* const _PREHASH_GroupAVSounds; #endif diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 0300867363..420a2b0f72 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -2036,7 +2036,7 @@ void LLPanelLandOptions::refresh() mPrivateParcelCtrl->set(parcel->getHiddenAVs()); mPrivateParcelCtrl->setLabel(getString("hidden_avs_text")); - mPrivateParcelCtrl->setEnabled(can_change_options && parcel->getHaveHiddenAVsData()); + mPrivateParcelCtrl->setEnabled(can_change_options && parcel->getHaveNewParcelLimitData()); BOOL can_change_landing_point = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_SET_LANDING_POINT); diff --git a/indra/newview/llpanellandaudio.cpp b/indra/newview/llpanellandaudio.cpp index f9730d9b71..e7bdc51b4a 100644 --- a/indra/newview/llpanellandaudio.cpp +++ b/indra/newview/llpanellandaudio.cpp @@ -91,6 +91,12 @@ BOOL LLPanelLandAudio::postBuild() mMusicURLEdit = getChild<LLLineEditor>("music_url"); childSetCommitCallback("music_url", onCommitAny, this); + mCheckAVSoundAny = getChild<LLCheckBoxCtrl>("all av sound check"); + childSetCommitCallback("all av sound check", onCommitAny, this); + + mCheckAVSoundGroup = getChild<LLCheckBoxCtrl>("group av sound check"); + childSetCommitCallback("group av sound check", onCommitAny, this); + return TRUE; } @@ -144,6 +150,13 @@ void LLPanelLandAudio::refresh() mMusicURLEdit->setText(parcel->getMusicURL()); mMusicURLEdit->setEnabled( can_change_media ); + + BOOL can_change_av_sounds = LLViewerParcelMgr::isParcelModifiableByAgent(parcel, GP_LAND_OPTIONS) && parcel->getHaveNewParcelLimitData(); + mCheckAVSoundAny->set(parcel->getAllowAnyAVSounds()); + mCheckAVSoundAny->setEnabled(can_change_av_sounds); + + mCheckAVSoundGroup->set(parcel->getAllowGroupAVSounds() || parcel->getAllowAnyAVSounds()); // On if "Everyone" is on + mCheckAVSoundGroup->setEnabled(can_change_av_sounds && !parcel->getAllowAnyAVSounds()); // Enabled if "Everyone" is off } } // static @@ -164,6 +177,13 @@ void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata) BOOL voice_enabled = self->mCheckParcelEnableVoice->get(); BOOL voice_estate_chan = !self->mCheckParcelVoiceLocal->get(); + BOOL any_av_sound = self->mCheckAVSoundAny->get(); + BOOL group_av_sound = TRUE; // If set to "Everyone" then group is checked as well + if (!any_av_sound) + { // If "Everyone" is off, use the value from the checkbox + group_av_sound = self->mCheckAVSoundGroup->get(); + } + // Remove leading/trailing whitespace (common when copying/pasting) LLStringUtil::trim(music_url); @@ -172,6 +192,8 @@ void LLPanelLandAudio::onCommitAny(LLUICtrl*, void *userdata) parcel->setParcelFlag(PF_USE_ESTATE_VOICE_CHAN, voice_estate_chan); parcel->setParcelFlag(PF_SOUND_LOCAL, sound_local); parcel->setMusicURL(music_url); + parcel->setAllowAnyAVSounds(any_av_sound); + parcel->setAllowGroupAVSounds(group_av_sound); // Send current parcel data upstream to server LLViewerParcelMgr::getInstance()->sendParcelPropertiesUpdate( parcel ); diff --git a/indra/newview/llpanellandaudio.h b/indra/newview/llpanellandaudio.h index 4b0953bdc1..32a45100f4 100644 --- a/indra/newview/llpanellandaudio.h +++ b/indra/newview/llpanellandaudio.h @@ -52,6 +52,8 @@ private: LLCheckBoxCtrl* mCheckParcelVoiceLocal; LLLineEditor* mMusicURLEdit; LLCheckBoxCtrl* mMusicUrlCheck; + LLCheckBoxCtrl* mCheckAVSoundAny; + LLCheckBoxCtrl* mCheckAVSoundGroup; 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 4ad42ea5bf..612d2a3bfe 100644 --- a/indra/newview/skins/default/xui/en/floater_about_land.xml +++ b/indra/newview/skins/default/xui/en/floater_about_land.xml @@ -1858,6 +1858,34 @@ Only large parcels can be listed in search. name="check sound local" left_pad="0" width="292" /> + <text + type="string" + length="1" + follows="left|top" + height="16" + layout="topleft" + left="10" + name="Avatar Sounds:" + top_pad="10" + width="100"> + Avatar Sounds: + </text> + <check_box + height="16" + label="Everyone" + layout="topleft" + left_pad="0" + name="all av sound check" + top_delta="0" + width="130" /> + <check_box + height="16" + label="Group" + layout="topleft" + left_pad="0" + name="group av sound check" + top_delta="0" + width="70" /> <text type="string" length="1" |