From 616b1e8ec1c14f04661a42c2c4cbf6410bdfac38 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 18 Sep 2018 15:12:51 -0700 Subject: [PATCH 01/11] Arrows in wave vector ctrl now match world and clouds. North at the top and East to the right. --- indra/newview/llpaneleditwater.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/indra/newview/llpaneleditwater.cpp b/indra/newview/llpaneleditwater.cpp index 5d7c6f3943..40d84d74bd 100644 --- a/indra/newview/llpaneleditwater.cpp +++ b/indra/newview/llpaneleditwater.cpp @@ -143,9 +143,9 @@ void LLPanelSettingsWaterMainTab::refresh() getChild(FIELD_WATER_FOG_DENSITY)->setValue(mWaterSettings->getWaterFogDensity()); getChild(FIELD_WATER_UNDERWATER_MOD)->setValue(mWaterSettings->getFogMod()); mTxtNormalMap->setValue(mWaterSettings->getNormalMapID()); - LLVector2 vect2 = mWaterSettings->getWave1Dir(); + LLVector2 vect2 = mWaterSettings->getWave1Dir() * -1.0; // Flip so that north and east are + getChild(FIELD_WATER_WAVE1_XY)->setValue(vect2.getValue()); - vect2 = mWaterSettings->getWave2Dir(); + vect2 = mWaterSettings->getWave2Dir() * -1.0; // Flip so that north and east are + getChild(FIELD_WATER_WAVE2_XY)->setValue(vect2.getValue()); LLVector3 vect3 = mWaterSettings->getNormalScale(); getChild(FIELD_WATER_NORMAL_SCALE_X)->setValue(vect3[0]); @@ -188,6 +188,7 @@ void LLPanelSettingsWaterMainTab::onNormalMapChanged() void LLPanelSettingsWaterMainTab::onLargeWaveChanged() { LLVector2 vect(getChild(FIELD_WATER_WAVE1_XY)->getValue()); + vect *= -1.0; // Flip so that north and east are - LL_WARNS("LAPRAS") << "Changing Large Wave from " << mWaterSettings->getWave1Dir() << " -> " << vect << LL_ENDL; mWaterSettings->setWave1Dir(vect); setIsDirty(); @@ -196,6 +197,7 @@ void LLPanelSettingsWaterMainTab::onLargeWaveChanged() void LLPanelSettingsWaterMainTab::onSmallWaveChanged() { LLVector2 vect(getChild(FIELD_WATER_WAVE2_XY)->getValue()); + vect *= -1.0; // Flip so that north and east are - LL_WARNS("LAPRAS") << "Changing Small Wave from " << mWaterSettings->getWave2Dir() << " -> " << vect << LL_ENDL; mWaterSettings->setWave2Dir(vect); setIsDirty(); From 2ee39e7df04161655c6d2476b39bda25bcd7380c Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Wed, 19 Sep 2018 16:54:53 +0300 Subject: [PATCH 02/11] SL-9665 FIXED [EEP] "Rename" greyed out for assets in My Environments --- indra/newview/llinventorybridge.cpp | 10 ++++++++++ indra/newview/llinventorybridge.h | 1 + 2 files changed, 11 insertions(+) diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 8d084f3ece..3dc138af7f 100644 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -7021,6 +7021,16 @@ BOOL LLSettingsBridge::renameItem(const std::string& new_name) return LLItemBridge::renameItem(new_name); } +BOOL LLSettingsBridge::isItemRenameable() const +{ + LLViewerInventoryItem* item = getItem(); + if (item) + { + return (item->getPermissions().allowModifyBy(gAgent.getID())); + } + return FALSE; +} + bool LLSettingsBridge::canUpdateParcel() const { return LLEnvironment::instance().canAgentUpdateParcelEnvironment(); diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 77d0fa4b04..ffe59b93e5 100644 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -625,6 +625,7 @@ public: virtual BOOL isMultiPreviewAllowed() { return FALSE; } virtual void buildContextMenu(LLMenuGL& menu, U32 flags); virtual BOOL renameItem(const std::string& new_name); + virtual BOOL isItemRenameable() const; virtual LLSettingsType::type_e getSettingsType() const { return mSettingsType; } protected: From 70a0fabdd8f7da5e486c7d182477008b5e851246 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Wed, 19 Sep 2018 16:55:36 +0300 Subject: [PATCH 03/11] SL-9672 [EEP] Right-click "Copy Asset UUID" should be inactive --- indra/llcommon/llassettype.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llcommon/llassettype.cpp b/indra/llcommon/llassettype.cpp index 5e85b01865..2bab557e3e 100644 --- a/indra/llcommon/llassettype.cpp +++ b/indra/llcommon/llassettype.cpp @@ -95,7 +95,7 @@ LLAssetDictionary::LLAssetDictionary() addEntry(LLAssetType::AT_MESH, new AssetEntry("MESH", "mesh", "mesh", false, false, false)); addEntry(LLAssetType::AT_WIDGET, new AssetEntry("WIDGET", "widget", "widget", false, false, false)); addEntry(LLAssetType::AT_PERSON, new AssetEntry("PERSON", "person", "person", false, false, false)); - addEntry(LLAssetType::AT_SETTINGS, new AssetEntry("SETTINGS", "settings", "settings blob", true, true, true)); + addEntry(LLAssetType::AT_SETTINGS, new AssetEntry("SETTINGS", "settings", "settings blob", true, true, false)); addEntry(LLAssetType::AT_NONE, new AssetEntry("NONE", "-1", NULL, FALSE, FALSE, FALSE)); }; From ff8f5f52a49d7984909a1d2dcb89ad81a3cb7588 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 19 Sep 2018 17:48:41 +0300 Subject: [PATCH 04/11] SL-9679 EEP - disable panel elements until data update, null cycle crash fix --- indra/newview/llfloaterland.cpp | 2 +- indra/newview/llfloaterregioninfo.cpp | 2 ++ indra/newview/llpanelenvironment.cpp | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/indra/newview/llfloaterland.cpp b/indra/newview/llfloaterland.cpp index 453c9f1138..3d3f5e8cfa 100644 --- a/indra/newview/llfloaterland.cpp +++ b/indra/newview/llfloaterland.cpp @@ -3340,8 +3340,8 @@ void LLPanelLandEnvironment::refreshFromSource() setCrossRegion(true); mCurrentEnvironment.reset(); mLastParcelId = INVALID_PARCEL_ID; - setControlsEnabled(false); } + setControlsEnabled(false); } diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 96ca7c1ac4..c8ed43871d 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -3451,6 +3451,8 @@ void LLPanelRegionEnvironment::refreshFromSource() LLEnvironment::instance().requestRegion( [that_h](S32 parcel_id, LLEnvironment::EnvironmentInfo::ptr_t envifo) { _onEnvironmentReceived(that_h, parcel_id, envifo); }); + + setControlsEnabled(false); } void LLPanelRegionEnvironment::doApply() diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp index ecffa34ab9..bc06bde138 100644 --- a/indra/newview/llpanelenvironment.cpp +++ b/indra/newview/llpanelenvironment.cpp @@ -550,7 +550,7 @@ void LLPanelEnvironmentInfo::onBtnEdit() (LLFloaterEditExtDayCycle::KEY_CANMOD, LLSD::Boolean(true))); dayeditor->openFloater(params); - if (mCurrentEnvironment->mDayCycle) + if (mCurrentEnvironment && mCurrentEnvironment->mDayCycle) dayeditor->setEditDayCycle(mCurrentEnvironment->mDayCycle); else dayeditor->setEditDefaultDayCycle(); @@ -562,7 +562,7 @@ void LLPanelEnvironmentInfo::onBtnSelect() if (picker) { picker->setSettingsFilter(LLSettingsType::ST_NONE); - picker->setSettingsAssetId((mCurrentEnvironment->mDayCycle) ? mCurrentEnvironment->mDayCycle->getAssetId() : LLUUID::null); + picker->setSettingsAssetId((mCurrentEnvironment && mCurrentEnvironment->mDayCycle) ? mCurrentEnvironment->mDayCycle->getAssetId() : LLUUID::null); picker->openFloater(); picker->setFocus(TRUE); } From cae08e0096f75827851a8c9447e163ddb0132f2d Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 19 Sep 2018 15:31:23 -0700 Subject: [PATCH 05/11] SL-9661: Trigger an event when the settings on a parcel or region are changed. Environment panel montiors this event and updates itself when it occurs. --- indra/newview/llenvironment.cpp | 10 +++++++++- indra/newview/llenvironment.h | 17 ++++++++--------- indra/newview/llpanelenvironment.cpp | 22 ++++++++++++++++++++++ indra/newview/llpanelenvironment.h | 4 ++++ indra/newview/llviewerparcelmgr.cpp | 7 +++++++ indra/newview/llviewerparcelmgr.h | 1 + 6 files changed, 51 insertions(+), 10 deletions(-) diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp index ec2577d053..3d8222a371 100644 --- a/indra/newview/llenvironment.cpp +++ b/indra/newview/llenvironment.cpp @@ -502,7 +502,9 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, const LLSe environment->setDay(pday, daylength, dayoffset); environment->setSkyTrack(mCurrentTrack); environment->animate(); - /*TODO: readjust environment*/ + + if (!mSignalEnvChanged.empty()) + mSignalEnvChanged(env); } @@ -519,6 +521,8 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, LLEnvironm environment->clear(); environment->setSky((fixed.first) ? fixed.first : mEnvironments[ENV_DEFAULT]->getSky()); environment->setWater((fixed.second) ? fixed.second : mEnvironments[ENV_DEFAULT]->getWater()); + if (!mSignalEnvChanged.empty()) + mSignalEnvChanged(env); /*TODO: readjust environment*/ } @@ -605,6 +609,10 @@ void LLEnvironment::clearEnvironment(LLEnvironment::EnvSelection_t env) } mEnvironments[env].reset(); + + if (!mSignalEnvChanged.empty()) + mSignalEnvChanged(env); + /*TODO: readjust environment*/ } diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index b5bd353066..32a99c4286 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -135,15 +135,12 @@ public: }; typedef std::pair fixedEnvironment_t; + typedef std::function environment_apply_fn; + typedef boost::signals2::signal env_changed_signal_t; + typedef env_changed_signal_t::slot_type env_changed_fn; + typedef std::array altitude_list_t; - typedef std::function environment_apply_fn; - - typedef boost::signals2::signal environment_changed_signal_t; - typedef environment_changed_signal_t::slot_type environment_changed_fn; - - typedef std::array altitude_list_t; - - virtual ~LLEnvironment(); + virtual ~LLEnvironment(); void loadPreferences(); void updatePreferences(); @@ -229,7 +226,7 @@ public: LLSettingsDay::ptr_t createDayCycleFromEnvironment(EnvSelection_t env, LLSettingsBase::ptr_t settings); //------------------------------------------- - connection_t setEnvironmentChanged(environment_changed_fn cb); + connection_t setEnvironmentChanged(env_changed_fn cb) { return mSignalEnvChanged.connect(cb); } void requestRegion(environment_apply_fn cb = environment_apply_fn()); void updateRegion(const LLUUID &asset_id, S32 day_length, S32 day_offset, environment_apply_fn cb = environment_apply_fn()); @@ -350,6 +347,8 @@ private: LLSettingsBlender::ptr_t mBlenderSky; LLSettingsBlender::ptr_t mBlenderWater; + env_changed_signal_t mSignalEnvChanged; + UserPrefs mUserPrefs; S32 mCurrentTrack; diff --git a/indra/newview/llpanelenvironment.cpp b/indra/newview/llpanelenvironment.cpp index bc06bde138..1beba9db0c 100644 --- a/indra/newview/llpanelenvironment.cpp +++ b/indra/newview/llpanelenvironment.cpp @@ -125,6 +125,12 @@ LLPanelEnvironmentInfo::LLPanelEnvironmentInfo(): { } +LLPanelEnvironmentInfo::~LLPanelEnvironmentInfo() +{ + if (mChangeMonitor.connected()) + mChangeMonitor.disconnect(); +} + BOOL LLPanelEnvironmentInfo::postBuild() { getChild(RDG_ENVIRONMENT_SELECT)->setCommitCallback([this](LLUICtrl *, const LLSD &){ onSwitchDefaultSelection(); }); @@ -138,6 +144,8 @@ BOOL LLPanelEnvironmentInfo::postBuild() getChild(SLD_ALTITUDES)->setCommitCallback([this](LLUICtrl *cntrl, const LLSD &value) { onAltSliderCallback(cntrl, value); }); + mChangeMonitor = LLEnvironment::instance().setEnvironmentChanged([this](LLEnvironment::EnvSelection_t env) { onEnvironmentChanged(env); }); + return TRUE; } @@ -151,7 +159,9 @@ void LLPanelEnvironmentInfo::onOpen(const LLSD& key) void LLPanelEnvironmentInfo::onVisibilityChange(BOOL new_visibility) { if (new_visibility) + { gIdleCallbacks.addFunction(onIdlePlay, this); + } else { LLFloaterSettingsPicker *picker = getSettingsPicker(false); @@ -164,6 +174,7 @@ void LLPanelEnvironmentInfo::onVisibilityChange(BOOL new_visibility) LLFloaterEditExtDayCycle *dayeditor = getEditFloater(); if (mCommitConnection.connected()) mCommitConnection.disconnect(); + if (dayeditor) { if (dayeditor->isDirty()) @@ -674,6 +685,17 @@ void LLPanelEnvironmentInfo::onEditCommitted(LLSettingsDay::ptr_t newday) } } +void LLPanelEnvironmentInfo::onEnvironmentChanged(LLEnvironment::EnvSelection_t env) +{ + if ((isRegion() && (env == LLEnvironment::ENV_REGION)) || + ((env == LLEnvironment::ENV_PARCEL) && (getParcelId() == LLViewerParcelMgr::instance().getAgentParcelId()))) + { + mCurrentEnvironment.reset(); + refreshFromSource(); + } +} + + void LLPanelEnvironmentInfo::onPickerAssetDownloaded(LLSettingsBase::ptr_t settings) { LLSettingsVODay::buildFromOtherSetting(settings, [this](LLSettingsDay::ptr_t pday) diff --git a/indra/newview/llpanelenvironment.h b/indra/newview/llpanelenvironment.h index a632acfd03..2753e766ac 100644 --- a/indra/newview/llpanelenvironment.h +++ b/indra/newview/llpanelenvironment.h @@ -43,6 +43,7 @@ class LLPanelEnvironmentInfo : public LLPanel { public: LLPanelEnvironmentInfo(); + virtual ~LLPanelEnvironmentInfo(); virtual BOOL postBuild() override; virtual void onOpen(const LLSD& key) override; @@ -137,6 +138,8 @@ protected: LLEnvironment::EnvironmentInfo::ptr_t mCurrentEnvironment; + void onEnvironmentChanged(LLEnvironment::EnvSelection_t env); + class AltitudeData { public: @@ -162,6 +165,7 @@ private: typedef boost::signals2::connection connection_t; connection_t mCommitConnection; + connection_t mChangeMonitor; LLHandle mSettingsFloater; LLHandle mEditFloater; S32 mDirtyFlag; diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp index 5a393220c3..c83e27ceed 100644 --- a/indra/newview/llviewerparcelmgr.cpp +++ b/indra/newview/llviewerparcelmgr.cpp @@ -1312,6 +1312,13 @@ const std::string& LLViewerParcelMgr::getAgentParcelName() const } +const S32 LLViewerParcelMgr::getAgentParcelId() const +{ + if (mAgentParcel) + return mAgentParcel->getLocalID(); + return INVALID_PARCEL_ID; +} + void LLViewerParcelMgr::sendParcelPropertiesUpdate(LLParcel* parcel, bool use_agent_region) { if(!parcel) diff --git a/indra/newview/llviewerparcelmgr.h b/indra/newview/llviewerparcelmgr.h index 06dae6e57e..336a3ea228 100644 --- a/indra/newview/llviewerparcelmgr.h +++ b/indra/newview/llviewerparcelmgr.h @@ -263,6 +263,7 @@ public: // accessors for mAgentParcel const std::string& getAgentParcelName() const; + const S32 getAgentParcelId() const; // Create a landmark at the "appropriate" location for the // currently selected parcel. From 9353022c5a06d4dc868b4231f41c1bb9aaf1ed3e Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 19 Sep 2018 19:18:55 +0300 Subject: [PATCH 06/11] SL-9707 EEP Make behavior more consistent for applying inventory --- indra/newview/llfloatereditextdaycycle.cpp | 18 ++++++++++++++++-- indra/newview/llfloaterfixedenvironment.cpp | 20 ++++++++++++++++++-- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp index fa16648140..3531e9c4e8 100644 --- a/indra/newview/llfloatereditextdaycycle.cpp +++ b/indra/newview/llfloatereditextdaycycle.cpp @@ -1260,11 +1260,25 @@ void LLFloaterEditExtDayCycle::doApplyEnvironment(const std::string &where, cons return; } - LLEnvironment::instance().updateParcel(parcel->getLocalID(), day, -1, -1); + if (mInventoryItem && !isDirty()) + { + LLEnvironment::instance().updateParcel(parcel->getLocalID(), mInventoryItem->getAssetUUID(), -1, -1); + } + else + { + LLEnvironment::instance().updateParcel(parcel->getLocalID(), day, -1, -1); + } } else if (where == ACTION_APPLY_REGION) { - LLEnvironment::instance().updateRegion(day, -1, -1); + if (mInventoryItem && !isDirty()) + { + LLEnvironment::instance().updateRegion(mInventoryItem->getAssetUUID(), -1, -1); + } + else + { + LLEnvironment::instance().updateRegion(day, -1, -1); + } } else { diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp index d65a578a6d..2eda405f51 100644 --- a/indra/newview/llfloaterfixedenvironment.cpp +++ b/indra/newview/llfloaterfixedenvironment.cpp @@ -430,17 +430,33 @@ void LLFloaterFixedEnvironment::doApplyEnvironment(const std::string &where) return; } - if (mSettings->getSettingsType() == "sky") + if (mInventoryItem && !isDirty()) + { + LLEnvironment::instance().updateParcel(parcel->getLocalID(), mInventoryItem->getAssetUUID(), -1, -1); + } + else if (mSettings->getSettingsType() == "sky") + { LLEnvironment::instance().updateParcel(parcel->getLocalID(), std::static_pointer_cast(mSettings), -1, -1); + } else if (mSettings->getSettingsType() == "water") + { LLEnvironment::instance().updateParcel(parcel->getLocalID(), std::static_pointer_cast(mSettings), -1, -1); + } } else if (where == ACTION_APPLY_REGION) { - if (mSettings->getSettingsType() == "sky") + if (mInventoryItem && !isDirty()) + { + LLEnvironment::instance().updateRegion(mInventoryItem->getAssetUUID(), -1, -1); + } + else if (mSettings->getSettingsType() == "sky") + { LLEnvironment::instance().updateRegion(std::static_pointer_cast(mSettings), -1, -1); + } else if (mSettings->getSettingsType() == "water") + { LLEnvironment::instance().updateRegion(std::static_pointer_cast(mSettings), -1, -1); + } } else { From 5c997d5ebc7b5d0a73b313da302d9ca0f5f6c65a Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 20 Sep 2018 17:42:33 +0300 Subject: [PATCH 07/11] SL-9662 [EEP] Slightly shift environment label positions --- .../newview/skins/default/xui/en/panel_region_environment.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/en/panel_region_environment.xml b/indra/newview/skins/default/xui/en/panel_region_environment.xml index cfb142093a..539d5a636b 100644 --- a/indra/newview/skins/default/xui/en/panel_region_environment.xml +++ b/indra/newview/skins/default/xui/en/panel_region_environment.xml @@ -70,7 +70,7 @@ Day Length (hours) From aafb9bebf48f79d06c82e601dd19cf2f2d70de9e Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 20 Sep 2018 15:39:06 -0700 Subject: [PATCH 08/11] SL-9636: Hide the anyone, group share and for sale checks in the properties panel for settings. (didn't do others items it may apply to) --- indra/llinventory/llinventorytype.cpp | 6 ++++++ indra/llinventory/llinventorytype.h | 2 ++ indra/newview/llsidepaneliteminfo.cpp | 21 ++++++++++++++++++++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/indra/llinventory/llinventorytype.cpp b/indra/llinventory/llinventorytype.cpp index 2b6b53556d..458adc9edd 100644 --- a/indra/llinventory/llinventorytype.cpp +++ b/indra/llinventory/llinventorytype.cpp @@ -209,6 +209,12 @@ bool LLInventoryType::cannotRestrictPermissions(LLInventoryType::EType type) } } +// Should show permissions that apply only to objects rezed in world. +bool LLInventoryType::showInWorldPermissions(LLInventoryType::EType type) +{ + return (type != IT_SETTINGS); +} + bool inventory_and_asset_types_match(LLInventoryType::EType inventory_type, LLAssetType::EType asset_type) { diff --git a/indra/llinventory/llinventorytype.h b/indra/llinventory/llinventorytype.h index 86486373b5..8f2267307b 100644 --- a/indra/llinventory/llinventorytype.h +++ b/indra/llinventory/llinventorytype.h @@ -134,6 +134,8 @@ public: // true if this type cannot have restricted permissions. static bool cannotRestrictPermissions(EType type); + static bool showInWorldPermissions(EType type); + private: // don't instantiate or derive one of these objects LLInventoryType( void ); diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp index 3ec8e1e911..e6ea5c3784 100644 --- a/indra/newview/llsidepaneliteminfo.cpp +++ b/indra/newview/llsidepaneliteminfo.cpp @@ -631,7 +631,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) LLUICtrl* edit_cost = getChild("Edit Cost"); // Check for ability to change values. - if (is_obj_modify && can_agent_sell + if (is_obj_modify && can_agent_sell && gAgent.allowOperation(PERM_TRANSFER, perm, GP_OBJECT_MANIPULATE)) { getChildView("CheckPurchase")->setEnabled(is_complete); @@ -657,6 +657,25 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item) edit_cost->setEnabled(FALSE); } + // Hide any properties that are not relevant to settings + if (is_settings) + { + getChild("GroupLabel")->setEnabled(false); + getChild("GroupLabel")->setVisible(false); + getChild("CheckShareWithGroup")->setEnabled(false); + getChild("CheckShareWithGroup")->setVisible(false); + getChild("AnyoneLabel")->setEnabled(false); + getChild("AnyoneLabel")->setVisible(false); + getChild("CheckEveryoneCopy")->setEnabled(false); + getChild("CheckEveryoneCopy")->setVisible(false); + getChild("CheckPurchase")->setEnabled(false); + getChild("CheckPurchase")->setVisible(false); + getChild("ComboBoxSaleType")->setEnabled(false); + getChild("ComboBoxSaleType")->setVisible(false); + getChild("Edit Cost")->setEnabled(false); + getChild("Edit Cost")->setVisible(false); + } + // Set values. getChild("CheckPurchase")->setValue(is_for_sale); getChild("CheckNextOwnerModify")->setValue(LLSD(BOOL(next_owner_mask & PERM_MODIFY))); From 6c9e4e3cf0f7c594034025499654b920d546671a Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Fri, 21 Sep 2018 14:38:32 +0300 Subject: [PATCH 09/11] SL-9715 [EEP] Allow setting default creation permissions for environment settings --- indra/newview/app_settings/settings.xml | 22 +++++++ indra/newview/llfloaterperms.cpp | 3 +- indra/newview/llfloaterperms.h | 1 + indra/newview/llsettingsvo.cpp | 4 +- .../default/xui/en/floater_perms_default.xml | 61 +++++++++++++++++++ 5 files changed, 89 insertions(+), 2 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 214b1a1965..123197db3b 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -15668,6 +15668,28 @@ Value 0 + SettingsNextOwnerModify + + Comment + Newly created Environment setting can be modified by next owner + Persist + 1 + Type + Boolean + Value + 1 + + SettingsNextOwnerTransfer + + Comment + Newly created Environment setting can be resold or given away by next owner + Persist + 1 + Type + Boolean + Value + 1 + DefaultUploadPermissionsConverted Comment diff --git a/indra/newview/llfloaterperms.cpp b/indra/newview/llfloaterperms.cpp index 2281ea1496..3968f43485 100644 --- a/indra/newview/llfloaterperms.cpp +++ b/indra/newview/llfloaterperms.cpp @@ -121,7 +121,8 @@ const std::string LLFloaterPermsDefault::sCategoryNames[CAT_LAST] = "Scripts", "Notecards", "Gestures", - "Wearables" + "Wearables", + "Settings" }; BOOL LLFloaterPermsDefault::postBuild() diff --git a/indra/newview/llfloaterperms.h b/indra/newview/llfloaterperms.h index e866b6de7d..02359a256e 100644 --- a/indra/newview/llfloaterperms.h +++ b/indra/newview/llfloaterperms.h @@ -74,6 +74,7 @@ enum Categories CAT_NOTECARDS, CAT_GESTURES, CAT_WEARABLES, + CAT_SETTINGS, CAT_LAST }; diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp index 583adcb024..4073639a20 100644 --- a/indra/newview/llsettingsvo.cpp +++ b/indra/newview/llsettingsvo.cpp @@ -43,6 +43,7 @@ #include "llagent.h" #include "llassettype.h" +#include "llfloaterperms.h" #include "llnotificationsutil.h" #include "llviewerregion.h" @@ -95,7 +96,8 @@ namespace void LLSettingsVOBase::createNewInventoryItem(LLSettingsType::type_e stype, const LLUUID &parent_id, inventory_result_fn callback) { LLTransactionID tid; - U32 nextOwnerPerm = LLPermissions::DEFAULT.getMaskNextOwner(); + U32 nextOwnerPerm = LLFloaterPerms::getNextOwnerPerms("Settings"); + nextOwnerPerm |= PERM_COPY; if (!LLEnvironment::instance().isInventoryEnabled()) { diff --git a/indra/newview/skins/default/xui/en/floater_perms_default.xml b/indra/newview/skins/default/xui/en/floater_perms_default.xml index 1c3af49bfe..49dc719a24 100644 --- a/indra/newview/skins/default/xui/en/floater_perms_default.xml +++ b/indra/newview/skins/default/xui/en/floater_perms_default.xml @@ -488,6 +488,67 @@ left_pad="0" top_delta="0" width="100" /> + + Settings + + + + + + + +