From 9353022c5a06d4dc868b4231f41c1bb9aaf1ed3e Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 19 Sep 2018 19:18:55 +0300 Subject: 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(-) (limited to 'indra') 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 { -- cgit v1.2.3 From 5c997d5ebc7b5d0a73b313da302d9ca0f5f6c65a Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 20 Sep 2018 17:42:33 +0300 Subject: SL-9662 [EEP] Slightly shift environment label positions --- indra/newview/skins/default/xui/en/panel_region_environment.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra') 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) -- cgit v1.2.3 From aafb9bebf48f79d06c82e601dd19cf2f2d70de9e Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 20 Sep 2018 15:39:06 -0700 Subject: 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(-) (limited to 'indra') 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))); -- cgit v1.2.3 From 6c9e4e3cf0f7c594034025499654b920d546671a Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Fri, 21 Sep 2018 14:38:32 +0300 Subject: 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 +- .../skins/default/xui/en/floater_perms_default.xml | 61 ++++++++++++++++++++++ 5 files changed, 89 insertions(+), 2 deletions(-) (limited to 'indra') 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 + + + + + + + +